Hi all!
Short Problem Description:
My problem is that my users always have manually choose a DSN every
time they go into their database. The automatic options are not
working.
Detailed Promblem Description:
When I use vba to connect to my Sybase database, the connection only
works if I use dbDriverPrompt and the user is prompted to enter the
DSN. This is true even when I tell it the correct DSN to use. For
example, the following works, but requires the user to choose the DSN
strConnect = "ODBC;DSN=Trans2;UID=sa;PWD={*filter*}Ladies"
Set WrkSpaceObj = DBEngine.CreateWorkspace("TmpWrkSpace", "sa", "",
dbUseODBC)
Set ConnectionObj = WrkSpaceObj.OpenConnection("PatIdx", dbDriverPrompt,
False, strConnect)
.... and the following does not work
strConnect = "ODBC;DSN=Trans2;UID=sa;PWD={*filter*}Ladies"
Set WrkSpaceObj = DBEngine.CreateWorkspace("TmpWrkSpace", "sa", "",
dbUseODBC)
Set ConnectionObj = WrkSpaceObj.OpenConnection("PatIdx",
dbDriverNoPrompt, False, strConnect)
I get error 3146 ODBC call failed.
My DSN called Trans2 looks like this:
[ODBC]
DRIVER=Sybase System 11
UID=sa
SRVR=prentis
DB=PatIdx
Does anyone have any idea how i can fix this?