Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > send password to unlock access db??


Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2003, 12:48 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Question send password to unlock access db??


I have an access db that has a password. How do I put the password in from vb to get into it?!?! I looked around and couldn't find any answers. Does anyone know?!
Reply With Quote
  #2  
Old 09-26-2003, 12:54 PM
Rekd's Avatar
Rekd Rekd is offline
Junior Contributor
 
Join Date: Jun 2003
Location: Un-bound array
Posts: 255
Default

I'm not sure, but that might borderline as an in-appropriate post. It would open an avenue for someone to create a brute force app to crack p/w's, which is forbidden on this site.

JM2C

'Rekd
__________________
Chasing your kid around the house yelling “TickleMonster! Gonna get you!” is fun.
Chasing a stranger around the mall yelling “TickleMonster! Gonna get you!” is apparently a misdemeanor.
Reply With Quote
  #3  
Old 09-26-2003, 01:06 PM
00100b's Avatar
00100b 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

Rekd,
I believe that this is a legit question.

dcat,
To specify the user and password for the connection string, use the uid and pwd parameters.
Code:
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<mdbfile>;uid=<username>;pwd=<password>;Persist Security Info=False"
You may need to specify the path to the System.MDW file by adding
Jet OLEDB:System Database=<mdwfile>

If you are referring to a Database Password (as in an Encrypted MDB), then add
Jet OLEDB: Database Password=<password>

Edit:
Remove the space between the : and the D above. On the forum here, it changes the : and D characters that are right next to each other into a smily
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #4  
Old 09-26-2003, 01:06 PM
PrOpHeT's Avatar
PrOpHeT PrOpHeT is offline
Hopelessly confused...

* Expert *
 
Join Date: Mar 2001
Location: Tyler, Tx.
Posts: 3,054
Default

it is part of the connection string
__________________
When you earnestly believe you can compensate for a lack of skill by doubling your efforts, there's no end to what you can't do ;)

For the love of Gold...
Reply With Quote
  #5  
Old 09-26-2003, 01:18 PM
Rekd's Avatar
Rekd Rekd is offline
Junior Contributor
 
Join Date: Jun 2003
Location: Un-bound array
Posts: 255
Default

Quote:
Rekd,
I believe that this is a legit question.
I sit corrected..

'Rekd
__________________
Chasing your kid around the house yelling “TickleMonster! Gonna get you!” is fun.
Chasing a stranger around the mall yelling “TickleMonster! Gonna get you!” is apparently a misdemeanor.
Reply With Quote
  #6  
Old 09-26-2003, 01:24 PM
00100b's Avatar
00100b 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

I just didn't want dcat to get scared off from receiving the services that this forum provides.
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #7  
Old 09-26-2003, 01:26 PM
Rekd's Avatar
Rekd Rekd is offline
Junior Contributor
 
Join Date: Jun 2003
Location: Un-bound array
Posts: 255
Default

I agree 100%. It's a great place to learn.

'Rekd
__________________
Chasing your kid around the house yelling “TickleMonster! Gonna get you!” is fun.
Chasing a stranger around the mall yelling “TickleMonster! Gonna get you!” is apparently a misdemeanor.
Reply With Quote
  #8  
Old 09-26-2003, 07:16 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

Thanks Guys this is the best forum.
Reply With Quote
  #9  
Old 09-26-2003, 07:18 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

What I want to do is protect my .mdb from other people accessing it unless they're in my program so I can track them. Thanks again
Reply With Quote
  #10  
Old 09-26-2003, 07:43 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

Now I'm using DAO do I put the connection string in the data control or do I specify it in the form load. I put it in the Connect on the data control like this...
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<C:\Documents and Settings\mydb.mdb>;uid=<admin>;pwd=<mypassword>;Persist Security Info=False"

and it said odbc connection failed

If I have this in the right spot is there something I'm missing?
Reply With Quote
  #11  
Old 09-26-2003, 08:03 PM
00100b's Avatar
00100b 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

The examples given were for ADO. Provider and Provider properties won't work for DAO.

It's been a while since I used DAO, that I couldn't tell you any of its connection properties (off the top of my head).

MSDN should have examples (as well as other threads in this forum).
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #12  
Old 09-26-2003, 08:50 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

Ok I switched it over to ado and it says could not find installable ISAM
I looked on MSDN at

http://support.microsoft.com/default...b;EN-US;209805

and all of those dll's are registered is there something else I'm missing?
Reply With Quote
  #13  
Old 09-26-2003, 08:53 PM
00100b's Avatar
00100b 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

What are you using for a connection string?
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #14  
Old 09-26-2003, 09:05 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

forget it for some reason I restarted vb and tryed it again and it worked maybe if one of those wasn't registered and since I had vb open it might not have took.So I guess if you get this error close vb and register all those dll's then start it up again. Thanks for all your help though.
Reply With Quote
  #15  
Old 09-28-2003, 05:36 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

By the way I figured out how to do it in doa after I got it to work in ado. But ado is faster

On Error Resume Next
Dim db As DAO.Database

Set db = DAO.OpenDatabase(DBPath, False, False, _
";pwd=" & Password)

If Err.Number = 0 Then
Set OpenPasswordProtectedDatabase = db
Else
Set OpenPasswordProtectedDatabase = Nothing
End If
Reply With Quote
  #16  
Old 09-30-2003, 12:48 PM
raze0811 raze0811 is offline
Newcomer
 
Join Date: Sep 2003
Posts: 20
Default

Quote:
Originally Posted by dcat
forget it for some reason I restarted vb and tryed it again and it worked maybe if one of those wasn't registered and since I had vb open it might not have took.So I guess if you get this error close vb and register all those dll's then start it up again. Thanks for all your help though.



Where in the VB program does the ConnectString go? I am using VB 5 and want to password protect my DB as well.
Reply With Quote
  #17  
Old 09-30-2003, 02:37 PM
dcat's Avatar
dcat dcat is offline
Junior Contributor
 
Join Date: Sep 2002
Posts: 217
Default

Put this in the form load on any form that has a data operator. I tryed making it global on a module but I would get wierd results.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Verify Password from Access in Vb form chwankok Database and Reporting 2 03-16-2004 09:07 PM
How to put Password in Access for connection string Password? goodmorningsky Database and Reporting 3 08-06-2003 11:45 AM
CODE 2 CHANGE PASSWORD &S TORE ITS NEW VALUE NEEDED sh33p16 Word, PowerPoint, Outlook, and Other Office Products 4 06-21-2003 11:29 PM
Problem with adding new users to database... Please Help MarkiasAklar Word, PowerPoint, Outlook, and Other Office Products 4 04-10-2003 01:10 AM
Open Access Database with Password X-Fe@R Database and Reporting 6 01-30-2002 06:33 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->