Solved

Vb6, Opening Access2000 Ado, with Password

Posted on 2001-08-28
3
284 Views
Last Modified: 2008-03-03
I had my program running perfectly, *until* i added a password to the Access2000 database.
ie. Open in Exclusive Mode, Security... Add the password
=============================
The Password  is   boss
=============================

(Problem 1)
Global rs As ADODB.Recordset
Global cnn As New ADODB.Connection

Function Opit()
cnn.Provider = "Microsoft.Jet.OLEDB.4.0;"
This does not work  .Cannot find installable ISAM.
'cnn.Open Trim(App.Path) & "\accesswol.mdb" & ";" & "Password=" & "boss"
This works if there is no password..
cnn.Open Trim(App.Path) & "\accesswol.mdb"

Set rs = New ADODB.Recordset
rs.Open "wol", cnn, adOpenKeyset, adLockOptimistic, adCmdTableDirect

**
From Help i see.
cnn2.Open "C:\Samples\northwind.mdb", "admin", ""
Is admin a user id, how do i know what the userid is??
-----------------------------------------
(Problem 2)
also, i am opening Access2000 in a DataRecord Area, how do i do this with a password...
DataEnvironment1.Connection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Trim(App.Path) & "\accesswol.MDB" & ";Persist Security Info=False"
-----------------------------------------

When fooling around, i did at some instances get an error refering to workgroup user !!!
User ID=sa;Password=pwd;"
What is User id ????



Appreciate any advice..

0
Comment
Question by:turnerrob
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Julian_K earned 75 total points
ID: 6434354
Hi :-)
You have too many questions ;-), but about the password:
Include this into your connection string:

Jet OLEDB:Database Password=boss;

Like:

private Connection1 as ADODB.Connection

private sub Connect(byval strDBFileName as string)
    dim strCnn as string
    strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=boss;Data Source=" & strDBFileName
    Set Connection1 = New ADODB.Connection
    Connection1.Open strCnn
end sub

Hope this helps.
0
 
LVL 5

Expert Comment

by:Julian_K
ID: 6434365
User ID is the user name.
You can define some Users to accsess the DataBase, with specific permissions (Read-Only, Write, Modify, etc.)
You should read some Access' help ;-)
0
 

Author Comment

by:turnerrob
ID: 6434434
Thanks for your help.

Have the password section finally going.!!!


Regards  Turnerrob
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question