How to check that the copying of an .mde file was successful

darbid

Registered User.
Local time
Today, 16:48
Joined
Jun 26, 2008
Messages
1,428
I have a simple .exe which users run which compares the dates of the .mde locally to that on a network share and if there is a newer .mde it simply copies the .mde from the network share to their local computer.

Recently it seems that this copy is not working properly and whilst an .mde file exists, it does not work, giving various errors.

A simply re-copy solves the problem.

My question is what is special about a .mde so that I can check that the copy process has worked and that the two .mde are identical. I know I can check file size but what else can I compare.

I would be using a VB.NET exe to do this. I realise that this might be a question which should be asked in a VB.net forum but I am not sure they will know about an .mde. I also realise there might be more general methods of checking files - but I first wanted to check if there was something special in an Access file.
 
If the mde file is open on the local drive it may appear to copy but it won't as it will raise a windows share violation error.
 
If the mde file is open on the local drive it may appear to copy but it won't as it will raise a windows share violation error.
Agreed, but that is impossible in my case as my .exe is also what starts my .mde. there is only a link on a users desktop to the .exe. The exe checks for a new version and then starts the .mde.
 
In your exe

First check locally for mde and get date last modified
Then check server DLM

If newer
? dir(.old)
if exists
kill .old

rename local copy .mde to .old

copy server to local
? dir(local mde)
if exists run mde

else
rename .old .mde
report error
 
HI David, maybe I asked my question the wrong way, but I have my updater working and has been for a long time.

The problem is that the copying of the file is not working - I am guessing cause the users internet connection is not working or something like that.

So I am looking for a check. I think I will have to look beyond VBA and Access to .NET and get the hash codes of the two files and compare.

My hope was there was a Access specific method or somthing like that.
 
Is the user getting the new file from a LAN or WAN?
 
So are you employing any checks to see if the user have a valid VPN connection prior to attempting the copy?

In other words can the dog see the cat?
 
If there were any problems with the VPN then they would not have access to the path. So all the animals can "see" each other.

I am not an expert on this and it has only just started happening.

Currently I have just told people how to force an update and when it copies the second time it has worked.
 
not sure - but if there is an .ldb file present, (which occasionally get left for some reason) then the dbs will THINK it is being used, and the copy will probably fail.

that may be worth checking.


and if there IS a ldb, and you cannot delete it directly, then you may need to restart the machine in order to delete it, if you are sure the dbs is not actually being used- as you occasionally get rogue locks of this sort.
 
not sure - but if there is an .ldb file present, (which occasionally get left for some reason) then the dbs will THINK it is being used, and the copy will probably fail.

Of course. That is cetainly possible. If the DB did not close properly last time then it could "think" that it is still open.

Thank you.
 

Users who are viewing this thread

Back
Top Bottom