Informix ODBC Connectivity
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all! Can Somebody please tell me How do I get connected to the Informix DB on a remote server within a Windows NT environtment. I am using ESQL/C for client side application coding. My simple task of getting connected to the DB using ESQL/C(I am compiling it with Visual C++) is giving me error that the ODBC Driver or DSN or not specified. Also the Code that I am using is the one given on the Informix Website "which actually sets the ODBC version to 3.0",but, I have ver 3.30 of ODBC and when I modify the version in the code, it is giving me a syntactic error. Can someone please tell me where I am makin a mistake at this. Thanks Srikanth jallapur@nortelnetworks.com
Hello Srikanth, Connecting to Informix through ESQL/C and ODBC are two different things. If you are using ESQL/C, you do not need an ODBC DSN. However, I have a feeling that the code you have downloaded is using ODBC. Does the code look something like: SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER) SQL_OV_ODBC2, SQL_IS_INTEGER) ? Before you could connect to an Informix database, you need to run the SETNET utility and create a database entry in there. Then, use the ILOGIN utility to make sure you can connect to the database. Then, you should create an ODBC DSN from the control panel. Once the entry is there, you can then connect to the database from your app. Thanks, Imran. ===================================================================== Imran Hussain imranh@imranweb.com For FREE Software visit http://www.imranweb.com/freesoft ===================================================================== Srikanth JAllapuram wrote: > Hi all! > Can Somebody please tell me How do I get connected to the Informix > DB on a remote server within a Windows NT environtment. I am using > ESQL/C for client side application coding. My simple task of getting > connected to the DB using ESQL/C(I am compiling it with Visual C++) is > giving me error that the ODBC Driver or DSN or not specified. > Also the Code that I am using is the one given on the Informix Website > "which actually sets the ODBC version to 3.0",but, I have ver 3.30 of > ODBC and when I modify the version in the code, it is giving me a > syntactic error. Can someone please tell me where I am makin a mistake > at this. > Thanks > Srikanth > jallapur@nortelnetworks.com --