PDA

Click to See Complete Forum and Search --> : Re-Post from below....


Dan0331
Nov 15th, 1999, 04:14 AM
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.

MartinLiss
Nov 15th, 1999, 04:34 AM
Here is how it's done using DAO

' 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).]

Dan0331
Nov 15th, 1999, 04:36 AM
Hi Marty,

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

Thanks again!