Client-Server Access database

monalisa

New member
Local time
Yesterday, 19:23
Joined
May 3, 2007
Messages
5
Hi

In my application I like to keep the same database version in both client and the server. So I created a procedure to overwrite the client database with the server database and then close the client application to restart with a new client version. But Access is not allowing me to open another object of the same database when its already running. I will be greatful if anyone can help me to me to fix this problem.

My code looks like:

Private Sub UpdateDB()

FileCopy strServer, strClient
DoEvents

strOpenClient = "MSAccess.exe " & strClient
Shell strOpenClient, vbNormalFocus

DoCmd.Hourglass False
DoCmd.Quit

End Sub


Cheers!
Mona :o
 
Why do you need to do this - is this the a Front End or Back End?
 
You are saying that if there is a new FE on the sever you want to overwrite the current file with the newer version on the server? If so I do something similar, your problem is you can not overwrite the file because you have it open. So what I do is if there is a new copy availabe I have the db close it self open up another db where I have code written in the start up form to copy the FE from the server to the client PC. Then I have the db close and open up the new version of the FE.
 
Hi Simon

Thanks for your reply. I need to keep the same version in slient side. Because whenever I do changes in server database the users(clients) should get the last version automatically.

Rgds
Mona
 
Hi KeithG

Thanks for your answer. The reason for my question is to keep the same version in client side wheneve I do changes in server database. I wonder if there are any methods to keep two instances of the same database alive??

Rgds
Mona
 
I normally go around the PC and make mde files peroidically and I have never tried to to automate the process. The tricky bit is that to obtain the version information without touching any of the files FE and BE source, they will be open and the client update will fail.

I think if you were trying to automate I would lauch the user into an intermediate database on the client side, two separate with basically two files the first form the Client and the second from the Server source file that you maintain. The two files:

UserVersion file and BEVersion (containing the version of application which you maintain at the Back End) don't match set the FEVersion to the BEVersion and make mde on the Client. If the two versions match then exit the intermiediate database and open the Front End.

I have read that the automation of compact DB and make mde commands are not available in access although I believe that there are scripts around to do the job.

Simon
 

Users who are viewing this thread

Back
Top Bottom