OS Caching of Files? Is it happening? Could it be something with Shadow Copy?

D

Dr. Network

A little background: I'm responsible for an application that distributes
default data for an application that my company produces. I'm testing this
default data application on Vista (build 5728). The application uses an SQL
Anywhere USER ODBC DSN to connect to a local copy of a SQL Anywhere database
in a folder in a Program Files sub-directory. The SQL Anywhere database is
versioned by a table called DATABASE_LEVEL in the file. My latest version is
2.6.0.263. I'm trying to test an earlier version 2.5.2.261. The application
has an InstallShield 10.5 installer that installs and uninstalls the
application. I uninstall the 2.6.0.263 version and the reference DB
disappears along with the sub-directory. I then install the 2.5.2.261
version. However, when I start the application, it reads a version of
2.6.0.263. Even if I delete the reference DB folder with the reference DB
the application still reads the 2.6.0.263 version. I have the source code
(in PowerBuilder) and I know that it is supposed to read this reference DB
to get the version number. I've traced the code back. Logically, there
should be no way that it is reading the 2.6.0.263 version number when the
2.5.2.261 version is installed or when it is manually deleted.

A few more facts:
1. When I look at the 2.5.2.261 reference database using a table viewer
(Embercadero's Rapid SQL), the version number is 2.5.2.261.
2. When I install the 2.5.2.261 in a different sub-directory structure than
the default where I normally install it, the application starts with the
2.5.2.261 version.
3. The SQL Anywhere 2.6.0.263 database file has a later date stamp than the
2.5.2.261 database file.
4. I copy the 2.5.2.261 database file to a different location. I manually
point the ODBC DSN to this second copy. The application starts and the
reference version is 2.5.2.261, not 2.6.0.263.
5. When I right click the 2.5.2.261 database file in the original location,
I can click an option called "Restore previous version". In the Previous
Versions tab, I can see the 2.6.0.263 version.

It appears that the OS is caching the 2.6.0.263 database file and using it.
It certainly appears this way based on the fact that when I totally delete
(not just recycle bin) the file, it still "finds" it and displays the later
version number.

Chuck
 
G

Guest

Hi,
Try looking in

C:\Users\(your user folder name)\AppData\Local\VirtualStore

(Note that AppData is a hidden folder.)

I use a program called "Locate" which creates a database in in the Program
Files\Locate folder. However, if I update the database through the program,
the newer database is created in a subfolder of the VirtualStore folder(i.e.,
"C:\Users\(my user folder name)\AppData\Local\VirtualStore\Program
Files\Locate"), and leaves the previous database in the Program Files\Locate
folder. Thus, there are always 2 databases, and somehow Vista directs the
program to use the new VirtualStore database, even though the program's
database properties dialogue thinks its latest (and only) files.dbs file is
in the default location (the Program Files\Locate folder).

In Windows XP, the new database overwrote the old database, without the use
of a VirtualStore folder.

As to why Vista steps in and re-organizes the program this new way, I have
no clue. These are just my observations, noticed when I couldn't figure out
why the database's modification date was always a day behind, yet the program
was running correctly, with the correct latest results.

Hope this helps,
Dean
 
G

Guest

Hi,
I should add that, no, I don't think it's a function of Shadow Copy, but
Vista helping programs call on certain documents that the program uses as the
conceivably "user personalized" part of the program, since the program that I
mentioned above isn't the only program that has had data cached. Vista has
cached *.txt, *.xml, and *.ini files, among other file-types, besides the
..dbs files I mentioned in my example in my previous post, for some of my
other non-Microsoft programs, when the programs seem to be creating/updating
these files as part of their program, once the program is run. The default
location for these files is usually, as far as the program is concerned,
"C:\Program Files\(program name)\*.*".

Dean
 
D

Dr. Network

That was definitely it. The VirtualStore has backup copies of the program.
This explains everything. I don't like it but it explains everything. Very
good to know.

Chuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top