VB can't connect informix?
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET
Hi All, I can't connect the informix database with the VB application. I've create the ODBC connection, and fill in all the require information. But I still can't connect to the informix database. What can I do? The error is like that [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed. and the coding is like that Set conn1 = New ADODB.Connection conn1.Open ("DSN=Informix;UID=;PWD=;DATABASE=dbre;SERVER=ol_dbsvr;SERVICE=turbo;") line1 = "select * from staff" Set rs = New ADODB.Connection Set rs = conn1.Execute(line1) Text1.Text = rs("staff_name") is there anything wrong.
>Subject: VB can't connect informix? >From: "Dora" swsleung@cs.cityu.edu.hk >Date: 02.05.00 12:01 W. Europe Daylight Time >Message-id: <8em8pg$8b3@news.cityu.edu.hk> > >Hi All, > >I can't connect the informix database with the VB application. >I've create the ODBC connection, and fill in all the require information. >But I still can't connect to the informix database. What can I do? > >The error is like that >[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed. > >and the coding is like that > Set conn1 = New ADODB.Connection > conn1.Open >("DSN=Informix;UID=;PWD=;DATABASE=dbre;SERVER=ol_dbsvr;SERVICE=turbo;") > line1 = "select * from staff" > Set rs = New ADODB.Connection > Set rs = conn1.Execute(line1) > Text1.Text = rs("staff_name") > >is there anything wrong. > > > you should add in a user name and password to your DSN. Nona
I use this string and it is now working ok: strTestDriver = "driver={INFORMIX 3.30 32 BIT}; server=server_name; host=host_name; service=service_name; protocol=OLSOCTCP; uid=User_Name; pwd=PassWord; database=dbName" Hope this helps... Paul Watawinona wrote in message <20000502104811.28989.00000731@ng-fk1.aol.com>... >>Subject: VB can't connect informix? >>From: "Dora" swsleung@cs.cityu.edu.hk >>Date: 02.05.00 12:01 W. Europe Daylight Time >>Message-id: <8em8pg$8b3@news.cityu.edu.hk> >> >>Hi All, >> >>I can't connect the informix database with the VB application. >>I've create the ODBC connection, and fill in all the require information. >>But I still can't connect to the informix database. What can I do? >> >>The error is like that >>[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed. >> >>and the coding is like that >> Set conn1 = New ADODB.Connection >> conn1.Open >>("DSN=Informix;UID=;PWD=;DATABASE=dbre;SERVER=ol_dbsvr;SERVICE=turbo;") >> line1 = "select * from staff" >> Set rs = New ADODB.Connection >> Set rs = conn1.Execute(line1) >> Text1.Text = rs("staff_name") >> >>is there anything wrong. >> >> >> > >you should add in a user name and password to your DSN. > >Nona