Hi,
I'm working with an Informix 3.32 32 BIT dbserver and want to connect my pass trough queries dsnless by setting the .connect parameter in the querydefs.
here's my odbc connection method (with pass-trough queries). I have one table in my Mdb file with the diffrent connect type's (to diffrent servers) On my form i have a dropdown box to change the odbc connection, the following is on lost_focus:
LODBC is the string to connect to and gives this (example) checked trough debug and is correct:
When this is done and i want to open the db, it occurs the following error (translated to english) 1351:ODBC: Could not connect to {INFORMIX 3.32 32 BIT}-rllonline. (the connection has not been made)
when i create a system-dsn it works all fine, but i don't want this!
How to get this work correct with dsn-less connections?
I'm working with an Informix 3.32 32 BIT dbserver and want to connect my pass trough queries dsnless by setting the .connect parameter in the querydefs.
here's my odbc connection method (with pass-trough queries). I have one table in my Mdb file with the diffrent connect type's (to diffrent servers) On my form i have a dropdown box to change the odbc connection, the following is on lost_focus:
Code:
Dim db As DAO.Database
Dim item As QueryDef
Set db = CurrentDb
lodbc = "ODBC;Driver={INFORMIX 3.32 32 BIT};Host=" & Me.ListDb.Column(1) & ";Server=" & Me.ListDb.Column(2) & ";Service=onlinetcp;Protocol=olsoctcp;Database=" & Me.ListDb.Column(3) & ";Uid=test;Pwd=test;"
For Each item In db.QueryDefs
If Left(item.Connect, 4) = "ODBC" Then item.Connect = lodbc
Next item
db.QueryDefs.Refresh
Set db = Nothing
Code:
ODBC;Driver={INFORMIX 3.32 32 BIT};Host=nameofhost;Server=servername;Service=onlinetcp;Protocol=olsoctcp;Database=dbprd;Uid=myid;Pwd=mypsw;
when i create a system-dsn it works all fine, but i don't want this!
How to get this work correct with dsn-less connections?