Connection to ODBC - hardcode password
Posted on 2003-03-27
I've got the following code:
myConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security " & _
And this link has a password, but I can't seem to hardcode the password in. It doesn't seem to work. Can anyone help me please.
When I link to the database, the userid is already filled in, via the DSN, it's just the password needs to be filled in.
I've tried using:
myConn.Attributes = dbAttachSavePWD
but that doesn't hold the password.
By the way - the code connects to the database, if the code is true then an event happens, if the code is false then it waits 15 secs and tries again. Therfore connecting to the database again.