ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   automation error (https://www.excelbanter.com/excel-programming/354683-automation-error.html)

tom taol

automation error
 

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 ***

Dave Patrick

automation error
 
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

"tom taol" wrote:
|
| 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 ***



tom taol

automation error
 
it is not.
the problem is the password setting.
the password is right, namely "q"


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

NickHK

automation error
 
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

"tom taol" wrote in message
...
it is not.
the problem is the password setting.
the password is right, namely "q"


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




Dave Patrick

automation error
 
"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

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




All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com