|
-
Nov 15th, 1999, 05:14 AM
#1
Thread Starter
Member
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.
-
Nov 15th, 1999, 05:34 AM
#2
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).]
-
Nov 15th, 1999, 05:36 AM
#3
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|