views:

119

answers:

4

I've got an MS-Access database stored in a folder (yes, I have 'Modify' permissions set for the folder) on a Vista machine.

From my .NET application (VB2008) I can query the database just fine, and add records to the tables. When I re-run the application the added records are there.

However if I start Access (2000) and open the database, the table that I just changed appears to have no new records added to it.

Is there some incompatibility with Vista and Access 2000?

EDIT: When I open the same database in Access 2003 on an XP machine, the new records show up just fine.

A: 

See if the record count increases?
If so, the records might be getting in there & due to indexing, it might not appear towards the end.

shahkalpesh
Not quite sure what you mean by 'might not appear towards the end', but in the .NET app, the record count increases. When viewed in Access 2000 the record does not show (there's only 4 records in the table, so it's not getting overlooked in a mass of other data).
Stewbob
shahkalpesh
Already tried that, didn't help.
Stewbob
Create a query with "SELECT * FROM theTable" to see what it has to output. I don't think it should be a problem with Vista.
shahkalpesh
In the .NET application, when I run this query, I get my new records. When I run this same query on the exact same file in Access 2000 in Vista, I do NOT get my new records. When I run this same query on the exact same file in Access 2003 in Windows XP, I do get my new records. Why is Vista (or Access 2000) not allowing me to see the changes made to the database?
Stewbob
That sucks completely. Is the MDB file on a network/shared drive on some other machine?
shahkalpesh
See if this link is of any use - http://support.microsoft.com/kb/927844/en-us
shahkalpesh
Is the .NET application using transactions, either explicitly or implicitly? The symptom you're seeing is exactly what you'd expect if an app used a transaction to append records and did not fully commit the transaction. It could also be that the transaction is not fully written until the connection is closed. This is all speculative, as I don't know what methods you're using for appending records from .NET.
David-W-Fenton
A: 

In your Access table, is it possible you're using a data type that's not compatible with Access 2000?

[I know this is very unlikely, but as they (more or less) say 'Desperate questions call for desperate answers']

Jay Riggs
I'm to the 'desperate' stage myself about now :), but no, I'm just storing strings and integers (1 string, 2 integers) and all my data types match between the application and the database.
Stewbob
I feel your pain.
Jay Riggs
A: 

I know you seem pretty sure that you are hitting the same DB from your response to gbn's answer, but to make absolutely sure, how about this test?

Use Access to insert new records in Access and see if they show up in the Application.

Another possibility is that it is going into the DB, but you app is reading/writing from a different table than you think it is. That would explain the inconsistency you are seeing too.

JohnFx
I tried that and the application has no problem seeing the new records.
Stewbob
I've only got one table, so there is no confusion about that.
Stewbob
+5  A: 

It does sound very much like you are experiencing the Vista virtualization feature. Vista won't let you write to the C:\Program Files folder (and a few others) and instead of throwing an error at you it writes to a shadow copy under your Users folder.

To check, open the properties of the .EXE and check XP mode + Run as Admin. Also see if you can find the shadow in C:\Users\User_name\AppData\Local\VirtualStore folder

To fix, try to locate your data elsewhere.

Henk Holterman
Henk, you the man! That is exactly what is happening. I changed the properties of MSACCESS.EXE to XP mode and Run as Admin. Now when I start Access and then open my database, I can see the records that were added by my .NET application. Thank You!!!!
Stewbob