 |
 |

09-26-2003, 12:48 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
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?!
|
|

09-26-2003, 12:54 PM
|
 |
Junior Contributor
|
|
Join Date: Jun 2003
Location: Un-bound array
Posts: 255
|
|
|
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.
|

09-26-2003, 01:06 PM
|
 |
Martian In Disguise
Retired Moderator * Guru *
|
|
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
|
|
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.
|

09-26-2003, 01:06 PM
|
 |
Hopelessly confused...
* Expert *
|
|
Join Date: Mar 2001
Location: Tyler, Tx.
Posts: 3,054
|
|
|
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...
|

09-26-2003, 01:18 PM
|
 |
Junior Contributor
|
|
Join Date: Jun 2003
Location: Un-bound array
Posts: 255
|
|
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.
|

09-26-2003, 01:24 PM
|
 |
Martian In Disguise
Retired Moderator * Guru *
|
|
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
|
|
|
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.
|

09-26-2003, 01:26 PM
|
 |
Junior Contributor
|
|
Join Date: Jun 2003
Location: Un-bound array
Posts: 255
|
|
|
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.
|

09-26-2003, 07:16 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
Thanks Guys this is the best forum. 
|
|

09-26-2003, 07:18 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
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 
|
|

09-26-2003, 07:43 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
|
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?
|
|

09-26-2003, 08:03 PM
|
 |
Martian In Disguise
Retired Moderator * Guru *
|
|
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
|
|
|
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.
|

09-26-2003, 08:50 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
|

09-26-2003, 08:53 PM
|
 |
Martian In Disguise
Retired Moderator * Guru *
|
|
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
|
|
|
What are you using for a connection string?
|
__________________
The only stupid question is the one that goes un-asked.
|

09-26-2003, 09:05 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
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. 
|
|

09-28-2003, 05:36 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
|
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
|
|

09-30-2003, 12:48 PM
|
|
Newcomer
|
|
Join Date: Sep 2003
Posts: 20
|
|
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.
|
|

09-30-2003, 02:37 PM
|
 |
Junior Contributor
|
|
Join Date: Sep 2002
Posts: 217
|
|
|
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.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|