|
-
January 23rd, 2008, 09:11 AM
#1
access database not updating
Hi
I have a c# application written with VS2005, that uses an access database.
When I run the application from within the the dev environment, it seems to connect to a different instance of the access database than when I run it as a standalone exe, although the path to the access database is the same.
Anybody know what is happening here ? When running the applciation from VS2005 is a temporary copy of the acccess database file used instead ?
any help would be appreciated
simon
-
January 23rd, 2008, 09:19 AM
#2
Re: access database not updating
I did not notify this behavior when I used Access databases. It seems that there are different paths been used. Insert a log message on the related code to see which paths are used at debug/release mode.
Useful or not? Rate my posting. Thanks.
-
January 23rd, 2008, 09:57 AM
#3
Re: access database not updating
This is fun !
I checked the connection string member of one of the table adaptors, displaying it in a message box.
It points to "c:\Program Files\company name\ product name\database\atomicdata.mdb"
The program seems to run ok, and I can view the data in the database.
Funny thing is that I have deleted "atomicdata.mdb" from my hard-drive.
So what file is my .exe file getting its data from I wonder ?
-
January 23rd, 2008, 10:27 AM
#4
Re: access database not updating
Seems you have to search again. Did you try to locate all instances of "atomicdata.mdb" on your harddrive? When you say you deleted the real one there must be another one and the program must linked to it. Without viewing the code it is hard to helping you for anyone.
Useful or not? Rate my posting. Thanks.
-
January 23rd, 2008, 11:00 AM
#5
Re: access database not updating
Hi Torrud
I should have added that I'm running under Vista.
I am pretty sure I deleted all copies of atomicdata.mdb from my hard-drive.
Interestingly I did a re-boot and and now my .exe falls over because it cannot find "atomicdata.mdb", which is how it should behave.
So I copied "atomicdata.mb" back off my memory stick, to
"c:\Program Files\company name\ product name\database\atomicdata.mdb"
The Software now runs, except I still have the problem that the data in "c:\Program Files\company name\ product name\database\atomicdata.mdb"
is not what is is loaded up by my exe (when running from the dev environment).
Though when I run the same exe from from widnows explorer, it does load the correct data from "c:\Program Files\company name\ product name\database\atomicdata.mdb"
-
January 23rd, 2008, 11:26 AM
#6
Re: access database not updating
Hi Torrud
it's now working. Unfortunately for no particular reason.
Strangely i have not seen this behavior under XP - perhaps is vista being flakey.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|