Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADO dsn-less connection string for DB2 odbc driver

127 views
Skip to first unread message

Mike Gong

unread,
Jun 15, 2002, 6:40:48 PM6/15/02
to
I find an ADO dsn-less connection string for DB2 odbc driver that works.

hr = pConnection->Open("Driver={IBM DB2 ODBC Driver}; protocol=tcpip;
hostname= <hostname>; database=<database>; servicename=50000;",
_bstr_t("<username>"), _bstr_t("<password>"), -1);

But this string need protocol name, hostname and service name. Does anybody
know a simpler string in case that the db2 database has been cataloged but
odbc data source has not cataloged.

Thanks a lot


Mike


Mike Gong

unread,
Jun 15, 2002, 7:16:44 PM6/15/02
to
Ha, I got it.

The connection string can be

"Driver={IBM DB2 ODBC Driver}; dbalias = <database alias name>;"

Please refer to DB2 UDB manual "Call level Interface Guide and Reference"
for more key words and details.


"Mike Gong" <mike...@rogers.com> wrote in message
news:QnPO8.353136$t8_.3...@news01.bloor.is.net.cable.rogers.com...

0 new messages