CData Python Connector for DB2

Build 20.0.7745


Connecting with the cdata.DB2 Module:

The connector's module is used directly to establish a connection with the data source. It is able to take a connection string as its argument, as in the below example:

import cdata.DB2 as mod
conn = mod.connect("Server=;Port=50000;User=admin;Password=admin;Database=test")
cur = conn.cursor()

Once the connection is created, you can execute subsequent SQL queries using the connection's cursor object.

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 20.0.7745