Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB6 giving error when connecting to Access 2000?

Posted on 2000-05-03
5
Medium Priority
?
161 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 150 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

722 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