Hi There,
I have the following code in my Visual basic module.
strPathtoDB2 = App.Path & "\REPORT.mdb;"
cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathtoDB2 & _
" Jet OLEDBatabase Password=mypassword" 'connection string
cn1.Execute "SELECT * INTO tblREPORT IN " & _
" REPORT.mdb FROM tblDATA"
I then set the REPORT.mdb password to "mypassword"
When I run the program it gives an error message "not a valid password" at cn1.Execute statement. I don't understand how do I get this error since I have already provided the password at cn2.Open statement above.
Any hints will be appriciated.
regards
I have the following code in my Visual basic module.
strPathtoDB2 = App.Path & "\REPORT.mdb;"
cn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathtoDB2 & _
" Jet OLEDBatabase Password=mypassword" 'connection string
cn1.Execute "SELECT * INTO tblREPORT IN " & _
" REPORT.mdb FROM tblDATA"
I then set the REPORT.mdb password to "mypassword"
When I run the program it gives an error message "not a valid password" at cn1.Execute statement. I don't understand how do I get this error since I have already provided the password at cn2.Open statement above.
Any hints will be appriciated.
regards