Solved

Vb6, Opening Access2000 Ado, with Password

Posted on 2001-08-28
3
289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month7 days, 3 hours left to enroll

623 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