dbTalk Databases Forums  

Win 7 virtual store question (with Access 2003)

comp.databases.ms-access comp.databases.ms-access


Discuss Win 7 virtual store question (with Access 2003) in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PW
 
Posts: n/a

Default Win 7 virtual store question (with Access 2003) - 03-21-2011 , 08:32 PM






Hi,

We just had a client's PC crashed so he took it to a repair shop and
they rebuilt it. However, the guy thought he backed up the data.mdb.
I assumed he backed up the C:\Program Files\ourapp folder.

He reinstalled our application, copied in the database and the client
tells us that the data is blank. My only guess is that the data was
also stored in the virtual store folder. He sent us the data.mdb and
it is indeed blank.

Can it be possible that the data was stored in two places?

I have code to display where the clients table is, but would this work
if the data was in the VS?

Dim dbpath As Variant
dbpath = CurrentDb.TableDefs("tblclients").Connect
Me.txtdatahome = Mid(dbpath, 11)

Some clients with Vista and Windows 7 have their data in the Program
Files folder (Where our application get's installed) and some in the
Virtual Store.

Maybe this client has been backing up the wrong data file (if at all)?
I am not sure that he has any paper backups (not a bad idea) also. I
am afraid that he just lost all of his data :-(

Comments?

-paulw

Reply With Quote
  #2  
Old   
Tony Toews
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 12:17 PM






On Mon, 21 Mar 2011 20:32:42 -0600, PW
<emailaddyinsig (AT) ifIremember (DOT) com> wrote:

Quote:
He reinstalled our application, copied in the database and the client
tells us that the data is blank. My only guess is that the data was
also stored in the virtual store folder. He sent us the data.mdb and
it is indeed blank.

Can it be possible that the data was stored in two places?

I have code to display where the clients table is, but would this work
if the data was in the VS?

Dim dbpath As Variant
dbpath = CurrentDb.TableDefs("tblclients").Connect
Me.txtdatahome = Mid(dbpath, 11)
I think that works but then I always ensure I follow the standards
that MS has been suggesting since before Windows 2000. And that is
don't use Program Files to store the data and or user updatable files.
This includes the Access FE because Access updates it as you work with
it.

You should be using the My Documents folder for the data MDB and the
Application Data folder for the Access FE.

Tony


--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #3  
Old   
PW
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 12:57 PM



On Tue, 22 Mar 2011 12:17:37 -0600, Tony Toews
<ttoews (AT) telusplanet (DOT) net> wrote:

Quote:
On Mon, 21 Mar 2011 20:32:42 -0600, PW
emailaddyinsig (AT) ifIremember (DOT) com> wrote:

He reinstalled our application, copied in the database and the client
tells us that the data is blank. My only guess is that the data was
also stored in the virtual store folder. He sent us the data.mdb and
it is indeed blank.

Can it be possible that the data was stored in two places?

I have code to display where the clients table is, but would this work
if the data was in the VS?

Dim dbpath As Variant
dbpath = CurrentDb.TableDefs("tblclients").Connect
Me.txtdatahome = Mid(dbpath, 11)

I think that works but then I always ensure I follow the standards
that MS has been suggesting since before Windows 2000. And that is
don't use Program Files to store the data and or user updatable files.
This includes the Access FE because Access updates it as you work with
it.

You should be using the My Documents folder for the data MDB and the
Application Data folder for the Access FE.

Tony

I am not sure I know how to have the installer install the data mdb in
the My Documents folder for all users, or how to specify to put the
MDE and whatever else in the Virtual Store for all users. We've
always had the MDE and MDW go to the C:\Program Files folder like
every other applictaion does that I have installed on every Windows PC
I've ever used. The user can change the installation for all the
files but I don't think separate files can be selected (should happen
automatically any way).

We have clients that use XP, Vista and Windows 7 (32 and 64 bit).
Would we have to make separate installation CDs for each version of
Windows, and when the clients update their versions of Windows?

So I guess because of Windows 7 (and Vista) sometimes installing the
data file in the VS, and sometimes in Program Files, this guy lost his
data. That stinks. Hope we don't get sued, but it isn't our fault
that clients don't have proper backup procedures installed and don't
once in a while print a hard copy report of important data like client
information and reservation information.

Thanks,

-paulw

Reply With Quote
  #4  
Old   
PW
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 02:30 PM



On Tue, 22 Mar 2011 12:17:37 -0600, Tony Toews
<ttoews (AT) telusplanet (DOT) net> wrote:

Quote:
On Mon, 21 Mar 2011 20:32:42 -0600, PW
emailaddyinsig (AT) ifIremember (DOT) com> wrote:

He reinstalled our application, copied in the database and the client
tells us that the data is blank. My only guess is that the data was
also stored in the virtual store folder. He sent us the data.mdb and
it is indeed blank.

Can it be possible that the data was stored in two places?

I have code to display where the clients table is, but would this work
if the data was in the VS?

Dim dbpath As Variant
dbpath = CurrentDb.TableDefs("tblclients").Connect
Me.txtdatahome = Mid(dbpath, 11)

I think that works but then I always ensure I follow the standards
that MS has been suggesting since before Windows 2000. And that is
don't use Program Files to store the data and or user updatable files.
This includes the Access FE because Access updates it as you work with
it.

You should be using the My Documents folder for the data MDB and the
Application Data folder for the Access FE.

Tony

Tony, although this is the first time this problem has happened to any
one that we know of as far as losing data like this because of the VS
folders, we used to install our app to C:\OurApp. Maybe going back to
that would make sense?

Thanks,

-paulw

Reply With Quote
  #5  
Old   
Access Developer
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 03:37 PM



"PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote

Quote:
. . . We've always had the MDE and MDW go
to the C:\Program Files folder like every other
applictaion does that I have installed on every
Windows PC I've ever used.
Are you being just a little condescending here? You are aware, are you not,
that the software application that is "like every other" is Access itself or
the Access runtime, not the "database application"? And, if one has not
split the data (back-end) from the user interface (front-end), what you
describe will store the user's data in C:\Program Files, also, and that is a
"no-no".

I'd say, if you are selling applications created in Access (as certainly
seems to be the case from what you write) and do not understand that, in
essence, both the front-end (database application) and the back-end (data
store) are really just "data files" to the Access or Access runtime
software, you need to back up and get more basic training about the
development tools you are using.

Larry Linson
Microsoft Office Access MVP

Reply With Quote
  #6  
Old   
PW
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 03:52 PM



On Tue, 22 Mar 2011 16:37:47 -0500, "Access Developer"
<accdevel (AT) gmail (DOT) com> wrote:

Quote:
"PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote

. . . We've always had the MDE and MDW go
to the C:\Program Files folder like every other
applictaion does that I have installed on every
Windows PC I've ever used.

Are you being just a little condescending here? You are aware, are you not,
that the software application that is "like every other" is Access itself or
the Access runtime, not the "database application"? And, if one has not
split the data (back-end) from the user interface (front-end), what you
describe will store the user's data in C:\Program Files, also, and that is a
"no-no".
Well, what if they (data.mde and code.mdb) were in a different folder?
Like C:\ourapp\ and\or C:\ourapp\data? Sometimes the data is on a
server and the tables get reattached (by the user pathing to it).

Or the MDE goes into Program Files but the data goes into
C:\ourapp\data? Would that make you happy :-)
Quote:
I'd say, if you are selling applications created in Access (as certainly
seems to be the case from what you write) and do not understand that, in
essence, both the front-end (database application) and the back-end (data
store) are really just "data files" to the Access or Access runtime
software
That I did not know!

Thanks Larry.

Reply With Quote
  #7  
Old   
PW
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 04:26 PM



On Tue, 22 Mar 2011 12:17:37 -0600, Tony Toews
<ttoews (AT) telusplanet (DOT) net> wrote:

Quote:
On Mon, 21 Mar 2011 20:32:42 -0600, PW
emailaddyinsig (AT) ifIremember (DOT) com> wrote:

He reinstalled our application, copied in the database and the client
tells us that the data is blank. My only guess is that the data was
also stored in the virtual store folder. He sent us the data.mdb and
it is indeed blank.

Can it be possible that the data was stored in two places?

I have code to display where the clients table is, but would this work
if the data was in the VS?

Dim dbpath As Variant
dbpath = CurrentDb.TableDefs("tblclients").Connect
Me.txtdatahome = Mid(dbpath, 11)

I think that works but then I always ensure I follow the standards
that MS has been suggesting since before Windows 2000. And that is
don't use Program Files to store the data and or user updatable files.
This includes the Access FE because Access updates it as you work with
it.

You should be using the My Documents folder for the data MDB and the
Application Data folder for the Access FE.

Tony

Sounds good. But XP doesn't have and Users\AppData folder. Most of
our clients are still on XP which is the reason we used to install the
code.mde and data.mdb on the C drive in it's own folder
(C:\ourappname\). My significant half changed the installation progam
to install both in Program Files. Oops.

Thanks Tony.

-paulw

Reply With Quote
  #8  
Old   
Access Developer
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 05:17 PM



Aargh. I reread and it was I who was being condescending. I apologize and
ask your forgiveness.

The front-end (UI for the database application) and back-end (data store)
should be in folders as you describe... if it is an "individual
application", they could be in the same folder, but if it is a multi-user
application, then it is most common to put the back-end on a server, so
would be in separate folders. Each user, in a multiuser environment, should
have his/her own copy of the front-end -- the probability of corruption (of
the front end) is significantly higher if multiple users are logged in to
the same copy.

In Access 2007 and later, you will probably want to identify the folder in
which you place the front-end as a "trusted location".

Larry Linson
Microsoft Office Access MVP


"PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote

Quote:
On Tue, 22 Mar 2011 16:37:47 -0500, "Access Developer"
accdevel (AT) gmail (DOT) com> wrote:

"PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote

. . . We've always had the MDE and MDW go
to the C:\Program Files folder like every other
applictaion does that I have installed on every
Windows PC I've ever used.

Are you being just a little condescending here? You are aware, are you
not,
that the software application that is "like every other" is Access itself
or
the Access runtime, not the "database application"? And, if one has not
split the data (back-end) from the user interface (front-end), what you
describe will store the user's data in C:\Program Files, also, and that is
a
"no-no".

Well, what if they (data.mde and code.mdb) were in a different folder?
Like C:\ourapp\ and\or C:\ourapp\data? Sometimes the data is on a
server and the tables get reattached (by the user pathing to it).

Or the MDE goes into Program Files but the data goes into
C:\ourapp\data? Would that make you happy :-)

I'd say, if you are selling applications created in Access (as certainly
seems to be the case from what you write) and do not understand that, in
essence, both the front-end (database application) and the back-end (data
store) are really just "data files" to the Access or Access runtime
software

That I did not know!

Thanks Larry.

Reply With Quote
  #9  
Old   
PW
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-22-2011 , 05:55 PM



On Tue, 22 Mar 2011 18:17:10 -0500, "Access Developer"
<accdevel (AT) gmail (DOT) com> wrote:

Quote:
Aargh. I reread and it was I who was being condescending. I apologize and
ask your forgiveness.

The front-end (UI for the database application) and back-end (data store)
should be in folders as you describe... if it is an "individual
application", they could be in the same folder, but if it is a multi-user
application, then it is most common to put the back-end on a server, so
would be in separate folders. Each user, in a multiuser environment, should
have his/her own copy of the front-end -- the probability of corruption (of
the front end) is significantly higher if multiple users are logged in to
the same copy.
Larry - I know all that! We've been doing that for years (200 clients
pretty soon).

We used to put both the front and back end in a "C:\ourappname" folder
(specified in InstallShield), but for some reason my wife decided to
get "hip" and change it to "C:\Program Files\ourappname". We are
going to change that from now on real soon, especially since we think
we had one client lose his data because he backed up the Program Files
mdb which turned out to be empty. I am thinking the data that was
getting updated must have gotten installed in the Virtual Store folder
for some reason, or in Users\UserName\AppData.... (I am pretty sure we
have also found the data in the VS folder within that). Too late now,
because his techie formatted the guys hard drive, reinstalled our
application and replaced the data back in the Program Files (he backed
it up before reformatting). It's empty.

Most of our clients are still on XP so they won't have a
"C:\Users\UserName\Appdata..." directory. So I think we should go
back to installing in "C:\ourappname\" folder. It can be so confusing
to try and help our clients try and find both the front and back end,
and when they want the data on a server or want to share the data on
another PC via their network (in which we have a table linking
module). It is 50/50 for us whether it's being run on one PC or more.

I have quite a few applications on my PC that have installed in
"C:\theirappname" by default.

Quote:
In Access 2007 and later, you will probably want to identify the folder in
which you place the front-end as a "trusted location".

Larry Linson
Microsoft Office Access MVP
That I am unsure about.

I hope that clears things up.

Thanks,

-paulw
Quote:

"PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote in message
news:736io6h5ggqvabs6kmmq3efabi0bfg505f (AT) 4ax (DOT) com...
On Tue, 22 Mar 2011 16:37:47 -0500, "Access Developer"
accdevel (AT) gmail (DOT) com> wrote:

"PW" <emailaddyinsig (AT) ifIremember (DOT) com> wrote

. . . We've always had the MDE and MDW go
to the C:\Program Files folder like every other
applictaion does that I have installed on every
Windows PC I've ever used.

Are you being just a little condescending here? You are aware, are you
not,
that the software application that is "like every other" is Access itself
or
the Access runtime, not the "database application"? And, if one has not
split the data (back-end) from the user interface (front-end), what you
describe will store the user's data in C:\Program Files, also, and that is
a
"no-no".

Well, what if they (data.mde and code.mdb) were in a different folder?
Like C:\ourapp\ and\or C:\ourapp\data? Sometimes the data is on a
server and the tables get reattached (by the user pathing to it).

Or the MDE goes into Program Files but the data goes into
C:\ourapp\data? Would that make you happy :-)

I'd say, if you are selling applications created in Access (as certainly
seems to be the case from what you write) and do not understand that, in
essence, both the front-end (database application) and the back-end (data
store) are really just "data files" to the Access or Access runtime
software

That I did not know!

Thanks Larry.

Reply With Quote
  #10  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: Win 7 virtual store question (with Access 2003) - 03-23-2011 , 02:55 PM



PW <emailaddyinsig (AT) ifIremember (DOT) com> wrote in
news:1krho69r4o65flpfv5tj7svbtbh7ipu4ca (AT) 4ax (DOT) com:

Quote:
We've
always had the MDE and MDW go to the C:\Program Files folder like
every other applictaion does that I have installed on every
Windows PC I've ever used. The user can change the installation
for all the files but I don't think separate files can be selected
(should happen automatically any way).
Since Windows 2000, you've been storing it in the wrong place.
You've been counting on people running your app as administrator, or
applying special permissions to your application folder. The
programs folder is read-only for non-admin users, and because every
Access file is written to any time it's opened (whether front end or
back end), it means it has to be stored in a writable location.
Given the principle of least-privileged user account (LUA), your app
would have broken for anyone following best practices (i.e., running
with LUA). I'm surprised it hasn't broken in Vista/Windows, since
UAC basically enforces LUA by running applications with a user-level
security token, even when logged on as an administrative user.

Your Access front end, even if you do consider it your "program", is
still a data file, and should not be installed in the programs
folder -- it should instead be installed in the user profiles
folder. Before Vista/Win7, you could put it in All Users, but that
has been changed and does not work as well. Instead, you have to put
it now in the AppData folder. You can use Windows APIs to find out
where that is (the locations have been changed in Vista/Win7 from
what they were in Win2000 and WinXP).

In short, you've been doing things wrong for over 10 years.

Welcome to the year 2000.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.