Establishing and Closing a Connection to Adaptive Server Using Python

Open and close a connection to Adaptive Server.

The connect method opens a database connection and accepts the following keyword arguments:

The connect method returns a connection object, which is then used to close the connection. This example shows how an application opens and closes a connection:

import sybpydb
    
    # Create a connection
   conn = sybpydb.connect(user='john', password='sybase')

    # Close the connection.
    conn.close()