RE: Dsn-less connection to informix
Posted in 1999
The following works from VB - I think it should work for you...
"ODBC;UID=ifmx;PWD=ifmx;DB=log;HOST=super;SRVR=superserv;SERV=sqlexec;PRO=on
soctcp;Driver={Informix-CLI 2.5 (32 BIT)};DSN='';"
-----Original Message-----
From: Kang U [mailto:yulguang@ints.co.kr]
Sent: Wednesday, April 07, 1999 2:00 AM
To: informix-list@iiug.org
Subject: Dsn-less connection to informix
Hello,
I'm writing a program that writes to informix dynamic server 7.3 on NT.
The client platform is windowsNT, and I'm using "Informix-CLI 2.8 32 bit "
ODBC driver.
Instead of using "32bit ODBC Administrator" from the windows control Panel,
I use a connection string that connect to informix server directly.
When I use MFC's CRecordset to connect to informix database,
I overrided a function, CRecordset::GetDefaultConnect() like this.
CString CMySet::GetDefaultConnect()
{
CString str;
str.Format("ODBC;DRIVER={INFORMIX 2.80 32 BIT};
Database=log;Host=super;Server=superserv;Service=1526;
Protocol=onsoctcp;UID=informix;PWD=informix;CLIENT_LOCALE=en_us.CP1252;
DB_LOCALE=en_us.CP1252;
return str;
}
When I executed this program , I got an error message :
General error. Insufficient Connection information was supplied
State:37000,Native:-11060,Origin:[Informix][Odbc Informix Driver]
Judging from the error message, I think I omiited some keyword
necessary to connetion string.
If anyone has an experience on this subject, please let me know.
Thanks.
______________
Kang U
yulguang@ints.co.kr
Ints corporation.
--------------