Solved

Connecting Access 2000 DB

Posted on 2002-04-03
3
180 Views
Last Modified: 2010-05-02
I'm running VB6 SP5 Full Install, and trying to open some DB tables (Access 2000) with methods such "OpenDatabase", but I get an error of "Unidentified Data Base Type" or something like that. What Patch/Pack/Driver/File/Library/JET Version or whatever must I install in order to make it work with A2000, and where can I find it. (I'm not using Data nor ADO objects which I know already came with such an option, I'm intended to use code only). I'll thank a lot the help that you may give me.
0
Comment
Question by:pire
[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 52

Expert Comment

by:Ryan Chong
ID: 6917057
Hi pire,

OpenDatabase is available for DAO:

Example:

Dim db As DAO.Database
        Dim dbEngine As New DAO.dbEngine
        Set db = dbEngine.OpenDatabase(DBPath)
.
.

Are you going to use ADO to connect to the Access Database?
0
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 6917070
For ADO:

Example:

Dim myConn As New ADODB.Connection
Dim rs As New ADODB.Recordset

.
.
myConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\abc.mdb;Persist Security Info=False"
    myConn.Open
   
    rs.Open "Select Max(id) As MaxID from [Table]", myConn, 1, 3
    MaxPLID = rs.Fields!MaxID
    rs.Close
.
.
   
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6917103
you need DAO 3.6 or ADO Jet 4.0
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…

691 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