
The driver is optimized to communicate directly and efficiently with Informix servers using the Informix server wire protocol.
The DataDirect Connect for ODBC Informix Wire Protocol driver connects to Informix servers without the need for any Informix networking software. Instantiate a Cursor and use the execute method of the Cursor class to execute any SQL statement.Ĭnxn = nnect('DRIVER= Server = 10.0.1.2 Port = 50000 User = admin Password = admin Database = test ')Ĭursor.execute("SELECT Id, Price FROM Books WHERE Category = 'US'")Īfter connecting to IBM Informix in P圜harm using the CData ODBC Driver, you will be able to build Python apps with access to IBM Informix data as if it were a standard database. Password: Set this to the password of a user allowed to access the database.ĭriver = CData ODBC Driver for IBM Informix. User: Set this to the username of a user allowed to access the database. Database: Set this to the name of the IBM Informix database. Port: Set this to the port the IBM Informix server is listening on. Server: Set this to the name of the server running IBM Informix. Set the following properties to connect to IBM Informix See the Getting Started section in the CData driver documentation for a guide to creating a DSN on your OS. You can now connect with an ODBC connection string or a DSN. Click Install Package to install pyodbc. To add pyodbc, click the + button and enter pyodbc.
Click Project Interpreter from the Project: YourProjectName menu.
Click File -> Settings to open the project settings window.
To begin, this tutorial will assume that you have already installed the CData ODBC Driver for IBM Informix as well as P圜harm.įollow the steps below to add the pyodbc module to your project. Included are steps for adding the CData ODBC Driver as a data source, as well as basic P圜harm code to query the data source and display results. In this tutorial we will explore using the CData ODBC Driver for IBM Informix from within P圜harm. The CData ODBC Drivers can be used in any environment that supports loading an ODBC Driver.