automation error

T

tom taol

this code do not work.
please...

Sub ADOOpenDBPasswordDatabase()

Dim cnn As New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ThisWorkbook.Path & "/db3.mdb;" & _
"Jet OLEDB:Database Password=q;"
cnn.Close
End Sub

*** Sent via Developersdex http://www.developersdex.com ***
 
D

Dave Patrick

Tools|References and check the box for 'Microsoft ActiveX Data Objects 2.x
Library'

Try a \ instead of /

Try http://www.connectionstrings.com/

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
|
| this code do not work.
| please...
|
| Sub ADOOpenDBPasswordDatabase()
|
| Dim cnn As New ADODB.Connection
| cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
| "Data Source=" & ThisWorkbook.Path & "/db3.mdb;" & _
| "Jet OLEDB:Database Password=q;"
| cnn.Close
| End Sub
|
| *** Sent via Developersdex http://www.developersdex.com ***
 
N

NickHK

tom,
I think you're wrong about the "\", but..
An easy way to create/test connection strings is to create a blank file
called Whatever.udl.
Double click and follow the wizard.
Then open the file in a text editor and see your connection string.

NickHK
 
D

Dave Patrick

"it is not."

Not what?

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| it is not.
| the problem is the password setting.
| the password is right, namely "q"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top