Mail address is invalid database password?

  • Thread starter Thread starter idiot
  • Start date Start date
I

idiot

When I set the access password with a mail address like (e-mail address removed), I can
open the database in access but whith connection string Jet OLEDB:Database
[email protected] I get the invalid password OleDbException.
 
I can't reproduce that. The code below works for me. If '(e-mail address removed)' was
just an example, it *may* be that there is something else about your
password that ADO or OLEDB doesn't like.

Public Sub TestSub5()

Const strcConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"User ID=Admin;Data Source=c:\usenet\passtest.mdb;" & _
"Persist Security Info=False;Jet OLEDB:Database
[email protected]"

Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset

Set cnn = New ADODB.Connection
cnn.Open strcConnection
Set rst = New ADODB.Recordset
rst.Open "SELECT * FROM Categories", cnn
Do Until rst.EOF
Debug.Print rst.Fields(0).Value
rst.MoveNext
Loop
rst.Close
cnn.Close

End Sub
 

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

Back
Top