user837818
user837818

Reputation: 13

adoconnection username and password

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 .

Upvotes: 1

Views: 6816

Answers (2)

Evert Jan Stokking
Evert Jan Stokking

Reputation: 1

I had the same problem. After some research, I had success with the following connection-string:

'Provider=Microsoft.Jet.OLEDB.4.0'
+';Jet OLEDB:Database Password='+Password
+';Data Source='+FileName
+';Persist Security Info=False'; 

Upvotes: 0

Sertac Akyuz
Sertac Akyuz

Reputation: 54832

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.

Upvotes: 3

Related Questions