UAC Stopping SQL Commands

gigabeard

Member
Joined
Jan 18, 2010
Messages
9
Location
MN USA
Programming Experience
5-10
I've been writing a shipping label and receipt application for the past couple years for a local printing company. I never encountered errors using Windows Vista.

Now that I'm on Windows 7, I can't send Insert (or other commands) to an Access database. I get an error. If I 'Run as Administrator' or turn off UAC, then I don't get any problems.

Additionally, this application will be used on the shop floor, with very restricted user accounts. The shop floor computers are still using XP, but it's possible that they will be upgrading to Win7. If so, I would like to be prepared.

How can I get around UAC blocking the SQL commands? Normal queries work (like simply retrieving data from the DB), but attempting to add, edit, or delete values in the Access database get denied with the following error:

"System.Data.OleDb.OleDbException

Operation must use an updateable query."

If I turn off UAC or right-click and Run as Administrator, then I don't get the error.

Has anyone experienced this? How can I figure out a workaround?? The database is stored in the current user's My Documents directory, but I still get the error.

Thanks
 
Oh, and on a sidenote, the database at the shop is located on a mapped network drive, where multiple terminals are setup to access it over the network. Developing from home, it's local.
 
Ok, at this point, the problem isn't share across the network. the problem is local.

(1) I am Administrator
(2) I have UAC turned on in Windows 7
(3) The database is stored locally (on my c: drive)
(4) My application can read from the database, but cannot write to it
(5) If I 'Run as Administrator' (even though my current user already is 'Administrator') I can read and WRITE to the database
(6) If I disable UAC, I can read and write to the database

I have been pulling my hair out and scouring the net trying to find the answer, but I haven't found one yet.

Thanks again for your help.
 
I just downloaded the Beta 2 for VS 2010 hoping that Microsoft fixed something in the newer version, but I still get the same error.
 
Back
Top