Solved

Does anybody know whether the Visual Basic 6.0 compatible with Access of Office 2000 or not?

Posted on 2002-03-13
10
160 Views
Last Modified: 2013-11-25
Hi, All,

Does anybody know whether the Visual Basic 6.0 compatible with Access of Office 2000 or not?

I have installed both Office 2000 and Visual Studio 98 on my computer. I would like to develop a database with Visual Basic and Microsoft Access. But with no success

I created a database in the MS Access first, then created a user interface on Visual Basic 6.0.  When I set RecordSource property at run time, the following error message was shown: “Unrecognized database format”

I tried another approach to this problem by creating a database at ”Visual Data Manager…” under  “Add-Ins” in the Visual Basic 6.0.  I can set properties such as DatabaseName, RecordSource, Field, etc.  However, when I click AddNew button to implement code “Data1.Recordeset.AddNew”, I got error message: “Run-time error ‘3426’ This action was cancelled by an associated object.”

What is the problem?

Thanks,

Anlee
0
Comment
Question by:Anlee
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 6861015
The original version of VB didn't have support for access 2000. SP5 does have support in some of the intrinsic controls for access 2000. Otherwise you need to ensure that you are referencing Microsoft ActiveX Data Objects 2.1 or higher if using ADO or if using DAO then version 3.6 rather than version 3.5. The earlier versions will not support access 2000. To use the data control that you appear to be trying to use you really should go to Service Pack 4 or higher (5 is available).
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 6861033
You need to get and run the latest version of MDAC_TYP.EXE Which will upgrade all of your DB drivers & so forth.  This is also, I believe, bundled with SP 4 or better.  I suggest you get service pack 5 and see if your problems don't clear up.
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 6861063
http://www.microsoft.com/data/download.htm
You can find MDAC_TYP.exe there...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

Expert Comment

by:TimCottee
ID: 6861110
MDAC will upgrade the available drivers indeed, however MDAC 2.6 and higher doesn't include the jet drivers which you can download seperately. Nor will it allow the intrinsic data control to support access 2000. You need SP4 or higher as already suggested to do this.
0
 

Expert Comment

by:bill02
ID: 6861249
Tim is right on using 3.6 instead of 3.5 but in code your record source must also have your provider as Microsoft.Jet.OLEDB.4.0 see example

recordsource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;Persist Security Info=False"

a common mistake is people still use oledb.3.51 this should be all you need between what me and tim have told you
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 6863488
bill02

Anlee is asking about DAO not ADO.

Anthony
0
 

Author Comment

by:Anlee
ID: 6868303
Hi, All,

Thanks for your help. I now know that “the original version of VB didn't have support for access 2000” from your help.

Unfortunately, I separately downloaded “jet40SP5_9xNT.exe” and “mdac_type.exe”(2.6) to try it, the same error message was appeared. Do you know what’s wrong with it?  Maybe I should install office 1997. Thanks again.

Regards,

Anlee
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6868336
Unless you have upgraded the data control then it still wont work unless you use code and reference the new dlls directly.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 6868398
This article from MSDN, gives all the details and workarounds when using the DAO Data Control:
PRB: Error "Unrecognized Database Format" When You Upgrade to Access 2000 or 2002 (Q238401)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q238401

Anthony
0
 

Author Comment

by:Anlee
ID: 6869274
Expert Anthorry ,

I have  gotten  good result from your help.

Thank you very much,

Anlee
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…

713 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