Connection Class
Represents a connection to a database.
Remarks
The Python driver supports all SQLDBC connection properties.
You can trace Python connections by using SQLDBC tracing.
Documentation is provided for methods that are not part of PEP 249 or whose behavior differs from PEP 249.
Methods
|
Method |
Description | Differences from PEP 249 |
|---|---|---|
| cancel() Method | Cancels the database request that is currently being executed on the connection. | Not defined in PEP 249. |
| close() Method | Closes the connection. | No implicit rollback is performed unless autocommit is turned off. |
| commit() Method | Commits any pending transactions to the database. | No implicit rollback is performed unless autocommit is turned off. |
| cursor() Method | Returns a new Cursor Object using the connection. | None. |
| getaddress() Method | Returns the host name that was used to connect to the database. | Not defined in PEP 249. |
| getautocommit() Method | Gets the connection's autocommit mode. | Not defined in PEP 249. |
| getclientinfo([key]) Method | Gets the connection's client information. | Not defined in PEP 249. |
| isconnected() Method | Returns a value that indicates whether there is a connection to the database. | Not defined in PEP 249. |
| rollback() Method | Performs a rollback on the connection. | Autocommit is turned on by default. |
| setautocommit([auto]) Method | Sets the connection's autocommit mode. | Not defined in PEP 249. |
| setclientinfo(string) Method | Sets the connection's client information. | Not defined in PEP 249. |
