Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB/Access app cant connect to odbc dbase

Status
Not open for further replies.

pms18066

Programmer
Jan 12, 2005
94
US

I have a VB 6.0 app using access 2000 database. This app resynchs their laptops to the master database on a machine in their office.. They use when they leave the office to copy the dbase locally to the laptop and then point the odbc connection for the app to the copied database... c:\... instead of s:\..

They then use another vb app which writes to the dbase locally...

Upon return to the office they then resynch the master dbase on the machine in their office... Update with changes made while in the field....

All worked fine until VISTA... I had to install Office 2007 with access on two newly purchased laptops.( Another story)

I had everything running fine until Last week. I now get an error trying to run the "Go remote" utility

Microsoft[ODBC Microsoft Access Driver] 'Unknown' is not a valid path. Make sure the path name is spelled correctly and that you are connected to the server....
-2147467259(80004005)..

I have googled and read alot and tried a lot of things.. rebooting all machines hasnt worked. Permissions havent changed since it was working ok.. If I try and debugg it in VStudio 2000 It works fine???? Any ideas??
 
OK After having to remove almost all o f Vista's Security features I finally recompiled the app on the vista machine and it(the exe) came up OK. However I started getting permission errors. First it comes up and says it cant find the table. I then open the mdb file in access and then close the databse without making any changes. I then get an error from the exe stating I dont have permission to read the tables.. HUH???? Is their something to do with the way vista lets the machine open up and mdb file? I went into the security in access and gave all users admiin authority on all tables and I got it to work on one machine three times in a row. I then went to the other laptop and tried to pull up the new exe and immediately got the same error I received before on both machines. The other machine then would error out again n a permission error. Arghh!!
 

Try putting the mdb in the Users\%UserName%\AppData folder
 
the database is on another machine in the network... The app normally uses the dbase from the network. The utility will repoint the odbc connection to the c drive and copy the dbase from the network to the local c drive. When it does this it updates a row in the databse which acts as a timestamp for the updates when they return... When I get the first errors it is after it has copied the database locally and it tries to read a tbale. Ill try it and let you know
Thx
 
I don't begin to understand all the vagaries of Vista Security, however mightn't it help to run the Access application as administrator, as you can choose to do in Vista?
 
yes I have selected that as far as the app goes. I read that I may need to set msaccess.exe as well to run as admin... Ill post again tomorrow. Thanks for the help...
 
Well I am getting closer.. If I turn off Vista User Control Acees then I dont get the "unknown" error. Once it is back on I get this error again.

If it is off I get a permissions error. If I rerun the utility It works fine for the "go remote" part. Then I try the "Return" button and I get the permissions error again. The utility traps out and the lock file is released from the dbase. I then go back into the utlity and press the "return" button again and it works fine. The inconsistency of it all is that it works fine when in the debugger so I cant see why, even if I could find that info in vb.
 
oh yeah. I am running as administrator. I havent tried to move the db as I have to rewrite some code and recompile for that to work...Ill try it and let ya know though..

Vista!!!
 
well it is working better but not always.. I have installed all of the updates for office and vista and turned off the user control piece and it works fine EVERY other time. I first get a persmissions error and then retry it and it works fine. Im surprised no one has ran into this issue before...
 
I would be more surprised to run into someone who hadn't had any issues with Vista. [mad]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top