rock2003
asked on
Get current datetime on datebase computer.
Hi experts
I use VB to connect to MSAccess DB on another computer named \\DB.
Now I want to save current datetime of \\DB in MSAcess DB.
Who can help me?
I use VB to connect to MSAccess DB on another computer named \\DB.
Now I want to save current datetime of \\DB in MSAcess DB.
Who can help me?
do you have access to the other computer, I mean are there directory shares is there Access or Excel installed and can you put a small piece of code there (i.e. Excel-/Accessmakro)?
If you can access the computer over a network drive you could create file on that netowrk drive using CreateTextFile and then use FileDateTime to determine that systems date/time.
Haydn.
Haydn.
you can also query the date/time of another computer (w/o changing something on that) by executing
Shell "cmd /C net time \\DB > %temp%\AnotherComputersDat
then read AnotherComputersDate.txt in your temp directory
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - no points refunded
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jadedata
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - no points refunded
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jadedata
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT Now() As MyDate FROM SomeSmallTable;
I'm guessing that the Now() function would run on the remote system returning the \\DB's time.
NOTE: I said "SomeSmallTable" for obvious reasons - the smaller the table you're querying the better performance you will get.
Haydn.