Results 1 to 3 of 3

Thread: Re-Post from below....

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    alb, nm 87112
    Posts
    56

    Post

    Hi Everyone,

    I need nusers to be able to push a button on thier version of the program that will match thier system time to that of the server time encoded within the program. I need to use the Mabry time control for security purposes, so the built in time command with VB is not a valid option.

    Also, if anyone knows how to access a password protected database from VB, I would appreciate it greatly if you would share it with me.

    Thanks.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Here is how it's done using DAO
    Code:
        ' GetWindowsDir is a routine I have that
        ' finds the Windows system directory which
        ' is where I store my MDA. If you know the
        ' path to the MDA you can hard-code it
        DBEngine.SystemDB = GetWindowsDir() & "MY.MDA"
        DBEngine.DefaultUser = "myusername"
        DBEngine.DefaultPassword = "mypassword"
        
        DoEvents
        
        'Open the databases
        ' gsMyPath is defined a string and gdbDB is defined as a Database
        gsMyPath = App.Path + "\mydb.mdb"
        Set gdbDB = Workspaces(0).OpenDatabase(gsMyPath)

    ------------------
    Marty

    [This message has been edited by MartinLiss (edited 11-15-1999).]

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    alb, nm 87112
    Posts
    56

    Post

    Hi Marty,

    Thanks for the post. Does this code go behind the DAO itself?

    Thanks again!

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