Solved

Vb6, Opening Access2000 Ado, with Password

Posted on 2001-08-28
3
287 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

752 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