Hy, I want to create several mdb files. Done that,I've created several tables, populated them, but I want to protect them by a custom password. How can I do that? :icon_confused:
Thanks!

Hy, I want to create several mdb files. Done that,I've created several tables, populated them, but I want to protect them by a custom password. How can I do that? :icon_confused:
Thanks!

Not sure if this is a C# question, but if you open your MDB and goto Tools > Security > Set database Password, you can put a password protection on it.

NOTE: Password protection on the Access file alone is not enough unless you are just preventing accidental viewing of the database. Search the web on this topic and you will see why...

First of all, sorry I didn't expose completely my problem. My C# aplication takes some data from one part, and after some operations I have to store my new data. The simplest way is in my view an Access database. I create the database and tables by code, but I also wanted the database to be protected by password from the moment I created it. I had some luck and tried :
ADOX.CatalogClass cat = new ADOX.CatalogClass();
cat = null;
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + new_path + "\\" + mdb_name + ".mdb;" + "Jet OLEDB:Database Password=my_password;Jet OLEDB:Engine Type=5");

and it worked.

PS: thanks for the warning about security.Even though I don't know what problems you are talking about I'll be searching...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.