Skip to Main Content
Python Programming On Win32
book

Python Programming On Win32

by Andy Robinson, Mark Hammond
January 2000
Intermediate to advanced content levelIntermediate to advanced
672 pages
21h 46m
English
O'Reilly Media, Inc.
Content preview from Python Programming On Win32

Cursor Objects

These objects represent a database cursor, which manages the context of a fetch operation.

Cursor objects should respond to the following methods and attributes:

description

This read-only attribute is a sequence of seven-item sequences. Each of these sequences contains information describing one result column: (name, type_code, display_size, internal_size, precision, scale, null_ok). This attribute is None for operations that don’t return rows or if the cursor has not yet had an operation invoked via the executeXXX() method.

The type_code can be interpreted by comparing it to the Type objects specified in the next section.

rowcount

This read-only attribute specifies the number of rows the last executeXXX() produced (for DQL statements such as select) or affected (for DML statements such as update or insert).

The attribute is -1 if no executeXXX() has been performed on the cursor or the row count of the last operation can’t be determined by the interface.Note 5

callproc( procname[,parameters] )

This method is optional since not all databases provide stored procedures. Note 3

Calls a stored database procedure with the given name. The sequence of parameters must contain one entry for each argument the procedure expects. The result of the call is returned as modified copy of the input sequence. Input parameters are left untouched, output and input/output parameters are replaced with possibly new values.

The procedure may also provide a result set as output. This must ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Python Programming - Second Edition

Advanced Python Programming - Second Edition

Quan Nguyen

Publisher Resources

ISBN: 1565926218Supplemental ContentErrata Page