I have several tables linked to SYBASE 12.0 via ODBC. I also have several tables linked to SQLServe 2000.
The following is the code I use to connect to them - I'm only pasting in one example since the code is identical for both except for the connect string.
strConnect = "ODBC;DSN=SCORE_READ;SRVR=SEWP12;DATABASE=sewp;UID=my_read_user;PWD=my_read_pwd;"
Application.SetOption "confirm action queries", 0
Application.SetOption "confirm record changes", 0
Set wrkRemote = DBEngine.Workspaces(0)
Set dbsRemote = wrkRemote.OpenDatabase("", False, False, strConnect)
dbsRemote.Close ' Close database but keep connection.
However, after this code runs to connect to sybase, it prompts me for the password. I've been using this approach since Access 97 - any new ideas how to connec to multiple SQL databases at the same time? I'm fairly sure that I use to connect to multiple databases utilizing this aproach.
Thanks,
The following is the code I use to connect to them - I'm only pasting in one example since the code is identical for both except for the connect string.
strConnect = "ODBC;DSN=SCORE_READ;SRVR=SEWP12;DATABASE=sewp;UID=my_read_user;PWD=my_read_pwd;"
Application.SetOption "confirm action queries", 0
Application.SetOption "confirm record changes", 0
Set wrkRemote = DBEngine.Workspaces(0)
Set dbsRemote = wrkRemote.OpenDatabase("", False, False, strConnect)
dbsRemote.Close ' Close database but keep connection.
However, after this code runs to connect to sybase, it prompts me for the password. I've been using this approach since Access 97 - any new ideas how to connec to multiple SQL databases at the same time? I'm fairly sure that I use to connect to multiple databases utilizing this aproach.
Thanks,