mjb3030 Posted September 27, 2005 Posted September 27, 2005 I have a fairly standard db application which uses dataadapters to populate datasets from an Access database. I set up the dataadapters using the wizard, so the delete, insert, and update commands were all created automatically. I have a few users now who need to be able to view the database, but are not permitted to make changes. I figured if I just gave them read only access to the MDB file, everything would be fine, but now they cannot run the program. They get an error stating that the file is either opened exclusively by someone else ( it isn't ) or they do not have permission. My assumption is that, since the dataadapters are set up to handle deletions, updates, and inserts, they can't be instantiated. Is that correct? If so, what would be the easiest way for me to make a "lite" version of this app that would allow read only? I'd prefer not to have to go through and remove all the dataadapters and put in datareaders. If I just go through the wizard and tell it not to create the delete, insert, and update commands will that take care of things? Quote
*Experts* Nerseus Posted September 27, 2005 *Experts* Posted September 27, 2005 Can you tell us where the error occurs? My guess is you're getting the error when openeing the connection, before any DataAdapters are created or used. Access is pretty particular about opening the database file. I'm not an Access guru, but I thought I remember seeing a special param on a connection string that signifies you don't want exclusive access. Maybe try that? It may simply be that you can't have the DB file readonly. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
mjb3030 Posted September 27, 2005 Author Posted September 27, 2005 This is my connection string: ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=\\\\server1\\ldb\\labtests.mdb;" & _ "User Id=admin;" & _ "Password=" I never explicitly call conn.open(). I just do a dataadapter.fill(ds). I have never had any problems with multiple users connecting at once. It was only when I changed the rights of certain users to read only did those users have problems. Quote
FZelle Posted September 28, 2005 Posted September 28, 2005 The Jet-Engine, which you are useing, needs WriteAccess to the directory, to write into the logfile. Like it or not, you have to grant that or use another DB. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.