Solved

Vb6, Opening Access2000 Ado, with Password

Posted on 2001-08-28
3
280 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for your help.

Have the password section finally going.!!!


Regards  Turnerrob
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now