Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > How to access MS Access Database


Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2001, 01:05 AM
zohagull
Guest
 
Posts: n/a
Question How to access MS Access Database


If Ms Access databse is secures by setting password at database level, How would it be accessed thru DAO or ADO.
e.g some Access Databse "Test" with Database Password "Test"

Reply With Quote
  #2  
Old 05-13-2001, 02:26 AM
zivavi
Guest
 
Posts: n/a
Default Re: How to access MS Access Database

Access is not secures by passward or username

Reply With Quote
  #3  
Old 05-13-2001, 04:54 AM
Swissa
Guest
 
Posts: n/a
Cool Re: How to access MS Access Database

If you are using DAO,then add a line like this

Data1.connect=";PWD=" & Password &";"

Where Data1 is the DAO object you are using , And Password is a string variable holding your Database Password

This line should be added before the Refresh Method

Yours:
Khalid


Reply With Quote
  #4  
Old 05-14-2001, 02:09 AM
Neptune
Guest
 
Posts: n/a
Default Re: How to access MS Access Database

If you use ADO you should specify the password of the access database in the connection string.

Here is what I use to open my Access 2000 mdb file (abc.mdb) with password ABRACADABRA using Jet 4.0

Dim Cnn as String ' Cnn is the connection string
Dim sDatabasePath as String ' My database file

sDatabasePath= "C:\My databases\abc.mdb

sCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDatabasePath & _
";Jet OLEDBatabase Password=ABRACADABRA;Persist Security Info=False"



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

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
 
 
-->