Solved

Connecting Access 2000 DB

Posted on 2002-04-03
3
142 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
  • 2
3 Comments
 
LVL 49

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 49

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 69

Expert Comment

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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

759 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

20 Experts available now in Live!

Get 1:1 Help Now