The Sybase module contains the following:
The owner argument must be an instance of the Connection class.
The owner argument must be an instance of the Connection
class. A bulk copy context will be established for the table named in
the table argument, the bulkcopy direction must be either
CS_BLK_IN
or CS_BLK_OUT
as defined in the
_sybase module.
This is an extension of the DB-API 2.0 specification.
= None
][, strip = 0
][, auto_commit = 0
][, bulkcopy = 0
][, delay_connect = 0
])
The dsn argument identifies the Sybase server, user and passwd are the Sybase username and password respectively. The optional arguments and their effect are:
Specifies the database to use - has the same effect as the following SQL.
use database
If non-zero then all char
columns will be right stripped of
whitespace.
Controls Sybase chained transaction mode. When non-zero, chained transaction mode is turned off. From the Sybase SQL manual:
If you set chained transaction mode, Adaptive Server implicitly invokes a begin transaction before the following statements: delete, insert, open, fetch, select, and update. You must still explicitly close the transaction with a commit.
Must be non-zero if you are going to perform bulkcopy operations on the connection.
If non-zero the returned Connection object will be initialised but not connected. This allows you to set additional options on the connection before completing the connection to the server. Call the connect() method to complete the connection.
db = Sybase.connect('SYBASE', 'sa', '', delay_connect = 1) db.set_property(Sybase.CS_HOSTNAME, 'secret') db.connect()
= None
][, strip = 0
][, auto_commit = 0
][, bulkcopy = 0
][, delay_connect = 0
])
Creates a new Connection object passing the function arguments to the Connection constructor.