Results 1 to 4 of 4

Thread: Date/Time

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    London, UK
    Posts
    58

    Post

    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
    * * * * * * * * * * * * * * * * * * * * * *
    AndyC
    London
    email: [email protected]
    * * * * * * * * * * * * * * * * * * * * * *

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 1999
    Location
    London, UK
    Posts
    58

    Post

    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
    * * * * * * * * * * * * * * * * * * * * * *
    AndyC
    London
    email: [email protected]
    * * * * * * * * * * * * * * * * * * * * * *

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width