Ms-access – adoconnection username and password

adoadoconnectiondelphims-access

i have an adoconnection in my form and use Access 2010 ( accdb database )

i set password in access for my DB

when i try to set this pass to Delphi i have some trouble :

1 : Delphi ask username and i have not any username .
2 : when i set password in ado ( with admin username or blank username ) i see this error :

test connection failed because of an error in initializing provider . cannot start your application . the workgroup information file is missing or opened exclusively by another user .

  • the DB file is not open when i receive this error .

Best Answer

Database password for access databases is not related with user level access rights, it is used for encrypting the database.

You can indicate the database password in the connection string with Database Password=mypass for Jet/ACE OLE DB or Pwd=mypass for OLE DB for ODBC or set it in the last page of the connection builder.