Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Dear Friends
I have created a project in vb6 and access 2007. After that i created a setup file of that project to run it on target computer. Everything is working fine but i can not find the database location created by the setup. There is a database on C:\program files\My folder\xxxx.mdb but after opening the database i can not find the saved records in it. It is shown empty although the front end is showing 100 records.
Also i would like to take backup of my database. Please Help
Thank you.
Regards
Sarfaraz
Posted
Comments
[no name] 17-Oct-12 12:01pm    
Sounds like you are looking at 2 different files. Windows has a handy dandy search function...
sarfarazbhat 17-Oct-12 22:45pm    
I have searched in windows but finds only one database which is stored in C:\program files\My folder\xxxx.mdb. But when i open it there are no records but application front end shows all records and create reports of all records.
[no name] 17-Oct-12 22:49pm    
There is absolutely something that you are not telling us. The records cannot be in the database and not in the database at the same time. First thing is to move the database out of the program files directory.
sarfarazbhat 18-Oct-12 1:41am    
Sir
I have my vb 6 project and all the files including database in a folder in drive C: I created a setup of my project using setup & deployment in vb6 and i have included the databhase file in that setup. After i install the setup in the target computer everything is working fine except that whenever i try to see the records which have been store in the database table from the front end of my project but i can see no records in the table. It is actually being opened in read only mode but still i should see the records in the database table.
My OS is WIn 7 and access 2007 as DB
Thank you
skydger 17-Oct-12 12:47pm    
What version of target operating system? What is the user rights which uses your applicaton?

1 solution

Please check the following path, there could be your database file:
x64
C:\Users\<your_user_account>\AppData\Local\VirtualStore\Program Files\My folder\

x86
C:\Users\<your_user_account>\AppData\Local\VirtualStore\Program Files (x86)\My folder\

I suppose you faced with UAC permissions. I experienced a similar issue some time ago and I found that even if your account has administrative privileges in Win7, some of user's actions to write exactly in Program Files (or Program Files (x86)) folder are not permited as a default, you have to run applications 'As Administrator' to write in these folders, or you can choose another way - to disable Virtual store (http://www.interworks.com/blogs/dsmith/2011/09/21/disabling-windows-7-virtual-store).[^]). But if you want my opinion it is not a good idea at all.
 
Share this answer
 
v2
Comments
sarfarazbhat 18-Oct-12 9:38am    
Thank you very much It solved my problem.
skydger 19-Oct-12 2:26am    
You're welcome :)
sarfarazbhat 22-Oct-12 5:31am    
Sir, is there any way i can prevent my setup saving my database file in
C:\Users\<your_user_account>\AppData\Local\VirtualStore\Program Files\My folder\
if yes how/what is the vb6 code.
skydger 22-Oct-12 14:42pm    
Well, there are several ways to prevent this. The first - is to store your database file in one of current user's folder. For this purposes, please see following link http://msdn.microsoft.com/en-us/library/ms995853.aspx

Secondly you can just check for user privileges elevation. For example refer this article:
http://zerosandtheone.com/blogs/vb/archive/2009/07/29/vb-net-how-to-tell-if-a-user-can-elevate-to-admin-rights-in-vista-and-windows-7.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900