python: Adodb Function Reference
Submitted by wd on Wed, 2007-01-24 11:00
Connection Class
optional params is a dictionary that contains the bind
variables. All blob fields are automatically and transparently
retrieved for you.
optional offset from the beginning of the recordset, returning
a cursor object.
Executes the equivalent following sql statement:
UPDATE table SET field = blob WHERE whereclause
The blobtype field should be set to either 'BLOB' or 'CLOB'.
Any special encoding required for the blob is applied
transparently.
Loads the binary file filepath into blob. Then
calls UpdateBlob( ).
thread-safe.
data recordset.
the dictionary. If more than 2 columns are returned, then the
dictionary values is a tuple of the 2nd to last columns. If 2 columns
are returned, then the 2nd column becomes the dictionary values. If one
column is returned, then the values are set to None.
- C: character fields that fit into a text input field.
- X: larger character fields that fit into a textarea.
- B: Blobs, or Binary Large Objects. Typically images.
- D: Date field
- T: Timestamp field
- L: Logical field (boolean or bit-field)
- I: Integer field
- N: Numeric field. Includes autoincrement, numeric,
floating point, real and integer.
fields of a table. Each row contains [fieldname, fieldtype, maxlength].
Maxlength can be -1, indicating that the maximum length is not known.
Note that some databases return more information in each row.
string acceptable to the database.
string acceptable to the database.
2.3 datetime object
Python 2.3 datetime object
start a transaction. This might not be thread-safe.
connection is closed when the object is freed.
Connection Class Properties
output to stdout as HTML. Set to a filepath (a string) if you want the
debug output to be logged into a file.
loaded automatically. Default is True, autoload. For best performance
(especially for cursors with no LOBs), set this to False.
Cursor Class Functions
rows affected by INSERT/UPDATE/DELETE. Returns -1 if not supported.
next row. The row retrieved is returned as a tuple.
the field names. Setting upper = 0 will lower-case the keys.
Setting upper=1 will upper-case the keys. Setting upper
to any other value, and the keys will be left in the natural case.
field. Only supported by mysql and odbc_mssql drivers
currently.
Returns field information from a SELECT statement. The fieldoffset
is zero-based, so to retrieve info on the 1st field use FetchField(0).
A tuple is returned, consisting of:
(name, type_code,display_size, internal_size, precision,
scale,null_ok).
the object is freed.
Cursor Class Properties
tuple (or list).
pass the last row.
- Printer-friendly version
- Log in or register to post comments
- 4286 reads
Recent comments