I’m working with a program that accesses an MS-Access DB. The problem is that if I open the db file with Access, the values I see aren’t the values I see when I’m using the program. For example, There is a table PARAMS with various program variables, one of them is the date I last loaded a certain file. In access it reads April 12th 2010, while in the program it reads May 7th 2010 (this is correct).
April 12th is about the time I upgraded the computer to Windows 7. Also, the mdb file sits next to the program executable in C:\Program Files (x86); and I know that Win7 doesn’t allow programs to write to the program files dir. So where are the changes saved?
What I’ve tried:
I’ve tried opening the mdb file on another computer – still reads the wrong (old) values
I’ve tried copying the entire program dir to a different folder – now both the program and ms-access read the wrong values.
Can someone tell me how to get a version of the DB with all the values up to date with the program?
Thanks.
Are you putting the database in the application folder? If so, you are probably experiencing UAC Virtualization (AKA Data Redirection).
“For example, if an application attempts to write to C:\Program Files\Contoso\Settings.ini, and the user does not have permissions to write to that directory (the Program Files), the write operation will be redirected to C:\Users\Username\AppData\Local\VirtualStore\Program Files\Contoso\settings.ini”
The database should be stored in the %APPDATA% folder instead.
http://windowsteamblog.com/blogs/developers/archive/2009/08/04/user-account-control-data-redirection.aspx
http://support.microsoft.com/kb/927387