I used the following code to connect with a Access Database :
Public Con As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=.\\DemoDatabase.accdb")
It works fine.
But when I make the database secure (password protected), it doesn't connect.
username = did not asked by Access
password = dbpasscode
Please help ....
Loading

Mayur DighePosted Mar 17, 2011, 11:51 AM
Public Con As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=.\\DemoDatabase.accdb; User ID=Admin;Password=dbpasscode"; )
_______________________________________________________________
Note:
If it works, make this post as ANSWER