-
Hi all,
I'm using Access as my DB and ado stuff to access it, so far so good. I would like all the clients to use the date/time from the same machine when stamping things to avoid confusion...
How? Ideally I'd like to use a stored procedure in Access so I don't *have* to have anything else running but I really don't know how.
OR
can I get Access to add the date/time whenever a new record is added?
Thanks very much,
AndyC
Edited by Andy Collyer on 03-09-2000 at 08:58 AM
-
Because Access DBs are manipulated on the client, you cannot get the time from the server via MS Access. All time is relative to the client.
You can...
have your app call API to sync time on client with a single server
-or-
run NET TIME in a shelled process to sync your clients clock with a server (this one doesn't involve APIs). Check the NET TIME parameters to get this one working
HTH
Tom
-
I've got round it for now by setting the "Initial Value" property for the field in Access to "Now()" but I don't know how that's derived - presumably on the server the .mdb file is on (??)
But I am interested in the sync API - do you have any more info? Library? Params??
Thanks again,
AndyC
-
Hi Andy
It might be easier to issue a NET TIME \\SERVER /SET /Y in a shelled process... I couldn't find any API reference to the proper function while poking around the MS site