Get server time/date

D

Danny

Hello:

i hope anyone can help me with the following problem:

I have an Access application that is running in many computers in a w2K
network. Data file is shared at server and forms and code file is on each
client computer. The application needs to get the server time (or date). I
know Accees do not have any function for this purpose, so i tried to do so
with the "NetRemoteTOD" API function and run properly. However, recently
many computers are translated to a remote branch office. Now that computers
access to the server in central office via VPN. The problem is
"NetRemoteTOD" do not work in this scenario, returning error code "53" (i've
supposed a 'timeout error' or similary).

Anyone know how to solve this problem, or any function or method to do so?

Thanks!!
 
D

Danny

Hello,
Van, as I have told in previous message i tried to use de NetRemoteTOD API
function and do not run properly via VPN, but evidently I did something
wrong because now I've copied & pasted code sample from MVP Access web page
link and... simply goes!!

Thank you very much for help!!
Bye

PD: After sending message I've tried an alternative solution and goes Ok...
this is a call to the "NET TIME \\MyServerName /SET /YES" command from
Access app. for synchronization purposes (executted under "RUNAS" command
for users with non administrative privileges) , but evidently is preferable
Access code, fully transparent and secure.
 
Top