Building ODBC Connect strings that work -
02-10-2004
, 11:02 AM
I've been trying to build a DAO.QueryDef.Connect string, building it
from a user ID and password string obtained previously by a log-in
dialog box, using it to log in to an Oracle database through an ODBC
connection. The problem I have is that it's intermittent, in that
invariably the first time I try to connect I still get the Oracle
log-in prompt where the user has to type in all the info again anyway;
and on subsequent connections sometimes the Connect string gets right
in, sometimes I still get the Oracle log-in dialog.
Here's an example of the Connect string using literals for
illustration:
qdfDWInstallBase.Connect = _
"ODBC;UID=MYUSERID;PASSWORD=MYPASSWORD;DSN=DW"
I have to think the purpose of the Connect string is to automate the
ODBC login. Any help at all would be greatly appreciated. Thanks in
advance! |