By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,101 Members | 1,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,101 IT Pros & Developers. It's quick & easy.

Add username/password to newly created MDB

P: n/a
I am trying to create a new mdb in C# using ADOX, i am able to create
DB , i want to add a username/password on that db , i have tried so
many things , cant make it to work , please help

ADOX.CatalogClass cat = new ADOX.CatalogClass();

cat.Create("Provider=" + provider + ";" +
"Data Source=" + databaseName + ";" +
"Jet OLEDB:Engine Type=5");

ADODB.ConnectionClass conn = new ConnectionClass();
conn.ConnectionString = string.Format("Provider={0};Data
Source={1};", provider,databaseName);
ADOX.UserClass user = new UserClass();
user.Name = userName;
// FAILS HERE , cant make this method to work.
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.