Solved

VB6 giving error when connecting to Access 2000?

Posted on 2000-05-03
5
158 Views
Last Modified: 2010-05-02
VB 6 is giving error when connecting to Access 2000 using DAO. But it is working fine for Access 97.
0
Comment
Question by:pramesh
[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
5 Comments
 
LVL 9

Accepted Solution

by:
Dalin earned 50 total points
ID: 2773002
Need to set reference to Microsoft DAO 3.6
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 2773024
Or ADO 2.1 or higher depending on whether using ADO or DAO.

You can obtain these from Microsoft site.
0
 

Author Comment

by:pramesh
ID: 2773075
Edited text of question.
0
 

Author Comment

by:pramesh
ID: 2773082
Edited text of question.
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2773644
For DAO, you need to reference DAO 3.6, not 3.5 in order to access MSAccess 2000.

visit the link
http://support.microsoft.com/support/kb/articles/q238/4/01.asp. it will tell you how to get unrecognized database format error message when upgradeing to access 2000.



If you go to RecordSource, you get the error.
In your Form_Load event, put the following code:

Private Sub Form_Load()
Dim daoDB36 As Database
'Dim rst As Recordset
Set daoDB36 = DBEngine.OpenDatabase("c:\yourfile.mdb")
'Dim rst = daoDB36.OpenRecordset(tablename or SQL Statement)
Set data1.Recordset = daoDB36.OpenRecordset(tablename or SQL Statement)
End Sub

Set the datasource of your bound controls to data1. You must then manually type in the datafield name, you cannot use the dropdown. You will have to bind your controls manually to the data control using the field names and add some code to make it work with DAO and MS Access 2000. This should work.  
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

696 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