01-15-2004, 11:44 PM
I am using Access 2000 to create my database and I am also using a data environment in VB .net. In the data environment, when you set up a connection, it ask for the location of the file and the password if there is any, so it create the connection string for you. Now my problem is, when I have no password on the database it connects fine, but when I add a password to the database and go to the connection in the dataenvironment and go through the wizard and type in the password and test the connection, it says the database is opened exclusively by another user. But the database is closed. I need to be able to set a password on the database so that the user cannot open it and modify it Any help is appreciated.
01-16-2004, 10:10 AM
Im guessing that you have set a password in the database using "Set database password". If so, then you need to remove that password, that stops anything getting in. Then go into "Tools, security, User + Group accounts". Go to the last tab and change the password for your user (you only have admin as default), this is the password you put into the .net server explorer, along with your admin username.
01-16-2004, 11:26 AM
Thanks Grimfort, but this doesn't work. It keeps giving me the same message. Do you have any other idea? Or could you try to do that and tell if can make the conection.
01-16-2004, 06:49 PM
Thats what I did, and it worked. I havent heard of it before, but I may add a password later on so investigated. Basically, using the Set Password just blocks the database from being used. Going into the actual user (called admin) setup is what you want, and it does work.
Try going through the steps again, remove the database password first, else it will have no effect. Then make sure the user admin has a password.
01-16-2004, 10:21 PM
Ok. Now I don't understand. I did what you said, removed that password, then I went into "Tools, security, User + Group accounts" and I don't have the user Admin. But if I test the connection now, with the Admin user and without password(inside the VB .Net), it works! And if thy to use a user with a password, it doesn't work.
01-31-2004, 08:36 PM
The only thing that this is doing is protect the program Microsoft Access with a password and not the database. If I distribute that database to another computer, anyone could see it and change it.
02-01-2004, 08:19 AM
I am not a big fan of the data environment, and I don't use it much, so any direct advice about that..isn't my speciality. But, I really think you are much better off just using an ADO connection string to open your Access database and pass your password into the connection string and go from there..it is reliable and sound, programmatic method.
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =;Password =;"), etc
02-01-2004, 09:42 AM
There's no dataenvironment in .Net....