ODBC Auto Connect
Posted on 2003-02-19
I have a MS Access 97 DB that links Oracle tables via MS ODBC for Oracle driver. What happens now is whenever the user runs the Access DB a prompt comes up asking the user for loginID, password and server. I would like to have this connection established automatically.
Something like this in the form_load event:
Dim db As Database, strCon As String
strCon = "ODBC;DSN=mydsn;UID=myuserid;PWD=mypassword;SERVER=myserver;"
Set db = OpenDatabase("", False, True, strCon)
'btw the above does not work
thanks in advance