ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] Not a valid password
my connect string is
sConnect="Provider=MSDASQL.1;Mode=ReadWrite;DSN=DSNData;MaxBufferSize=2048;PageTimeout=20;UID=Admin;PWD=MyPassword"
The password is valid!
other code is:
Dim cConn As Microsoft.Data.Odbc.OdbcConnection = New Microsoft.Data.Odbc.OdbcConnection
cConn.ConnectString = sConnect
cConn.Open()
The same code (without the psw and uid) works perfectly fine if the database has no password.
--
Frank
"SamNET" <anon...@discussions.microsoft.com> wrote in message
news:95718940-58F3-4858...@microsoft.com...
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:Database Password=MyDbPassword", _
"myUsername", "myPassword"
Thanks,
Russ Gray
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Because your example does not work when you use a DSN. I've searched "ALL" of msdn.Microsoft.com and have not found a way to do it.
HTH
--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
"SamNET" <anon...@discussions.microsoft.com> wrote in message
news:65F1C7C8-9FE1-41AC...@microsoft.com...