|
-
Jul 18th, 1999, 12:53 AM
#1
Thread Starter
PowerPoster
Hi, Does anyone know how I can physically open MSAccess itself with the database loaded from VB. You might say use the Shell function, but I need VB to supply a database password without the user seeing it, and I can't think how. I tried Sendkeys, but this can easily be overcome by giving Notepad focus....!!! Any ideas greatly received.
-
Jul 18th, 1999, 06:08 PM
#2
Addicted Member
This is how you open a database in VB and pwd=PasswordName will open a password protected database where PasswordName is your Password.
Dim db as database
Set db = OpenDatabase _
("Database Path And Name", False, False, "MS Access;pwd=Password Name")
You can place the password in Window regisrty and use Api call to call back to a text box then use
Dim db as database
Set db = OpenDatabase _
("Database Path And Name", False, False, "MS Access;pwd=" & TextBox)
------------------
-
Jul 20th, 1999, 02:35 AM
#3
Thread Starter
PowerPoster
That's great, but how can I convert it to use with VB6. VB6 doesn't recognise Database as a data type - it says 'User-defined type not defined' when you try and run it.
-
Jul 20th, 1999, 09:13 PM
#4
Lively Member
Hi,
Add a reference to the Microsoft DAO 3.5 Object Library from the menu Project|References.
HTH,
Preeti
-
Jul 21st, 1999, 03:56 AM
#5
Thread Starter
PowerPoster
Doh! Why didn't I think of that...! Thanks ScottF and Preeti.
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
|