I have a program that creates ODBC datasources programatically using the Windows API SQLConfigDataSource(). It works fine for other drivers, but not IBM DB2 ODBC DRIVER. I have narrowed it down to a keyword/value pair problem in the following call:
SQLConfigDataSource(GetDesktopWindow(),
ODBC_ADD_SYS_DSN,
DB2_DRIVER,
"DSN=TEST\0"
"DESCRIPTION=test\0"
"UID=myUid\0"
"PWD=mypwd\0"
"DATABASE=myDB\0"
);
Where DB2_DRIVER is "IBM DB2 ODBC DRIVER".
It appears that the DSN,DESCRIPTION, and DATABASE parameters are incorrect...the UID and PWD are being passed just fine...any ideas. I'M DESPARATE!!!
Thanks alot
SQLConfigDataSource(GetDesktopWindow(),
ODBC_ADD_SYS_DSN,
DB2_DRIVER,
"DSN=TEST\0"
"DESCRIPTION=test\0"
"UID=myUid\0"
"PWD=mypwd\0"
"DATABASE=myDB\0"
);
Where DB2_DRIVER is "IBM DB2 ODBC DRIVER".
It appears that the DSN,DESCRIPTION, and DATABASE parameters are incorrect...the UID and PWD are being passed just fine...any ideas. I'M DESPARATE!!!
Thanks alot