Solved

Connecting Access 2000 DB

Posted on 2002-04-03
3
164 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 50

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 50

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

831 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