problems with Informix ODBC drivers
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET
I have some problems in using the Informix ODBC drivers: 1) "INFORMIX 3.30 32 BIT" Following VB source code fails always: intRet = SQLConfigDataSource(vbAPINull, DSN_TYPE, strDriver, strAttributes) when strDriver = "INFORMIX 3.30 32 BIT", DSN_TYPE= ODBC_ADD_DSN. Content of "strAttributes" is also correct. But the same code works well with the ODBC driver "INTERSOLV 3.11 32 BIT INFORMIX 9". 2) Both the ODBC drivers. I need to connect to a informix database without user input dialogs. I already know the details like, "Data source name", "database name", "user name" etc. Following VB code does the connection, but it shows dialogs. rc = SQLDriverConnect(hdbc, UsrWizard.hWnd, _ constr, Len(constr), _ constrout, Len(constrout), _ ByVal Count, SQL_DRIVER_PROMPT) If I use "SQL_DRIVER_NOPROMPT" the above line returns "-1"(means failed). Thanks, (Byju)
For the Intersolve 3.11 driver, check your DSN setup. There should be a check box for "Use default login" on the 'connection' tab. Checking this should let your VB script connect using the uid and pwd values in the DSN. HTH -- R. Mitchell "Byju Geevarghese" <Byju.Geevarghese@sicad.de> wrote in message news:3948DF03.97397CC4@sicad.de... > > I have some problems in using the Informix ODBC drivers: > > > 1) "INFORMIX 3.30 32 BIT" > > Following VB source code fails always: > > intRet = SQLConfigDataSource(vbAPINull, DSN_TYPE, strDriver, > strAttributes) > > when strDriver = "INFORMIX 3.30 32 BIT", DSN_TYPE= ODBC_ADD_DSN. > Content of "strAttributes" is also correct. > > But the same code works well with the ODBC driver "INTERSOLV 3.11 32 BIT > > INFORMIX 9". > > > 2) Both the ODBC drivers. > > I need to connect to a informix database without user input dialogs. > I already know the details like, "Data source name", "database name", > "user name" etc. > > Following VB code does the connection, but it shows dialogs. > > rc = SQLDriverConnect(hdbc, UsrWizard.hWnd, _ > constr, Len(constr), _ > constrout, Len(constrout), _ > ByVal Count, SQL_DRIVER_PROMPT) > > If I use "SQL_DRIVER_NOPROMPT" the above line returns "-1"(means > failed). > > > > > Thanks, > > > > (Byju) > >
Thanks a lot, The "Use default login" option solved the problem. (byju) "R. Mitchell" wrote: > For the Intersolve 3.11 driver, check your DSN setup. There should be a > check box for "Use default login" on the 'connection' tab. Checking this > should let your VB script connect using the uid and pwd values in the DSN. > HTH > >