Solved

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

Posted on 2002-03-13
10
157 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
Comment Utility
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
Comment Utility
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
Comment Utility
http://www.microsoft.com/data/download.htm
You can find MDAC_TYP.exe there...
0
 
LVL 43

Expert Comment

by:TimCottee
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
bill02

Anlee is asking about DAO not ADO.

Anthony
0
 

Author Comment

by:Anlee
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Expert Anthorry ,

I have  gotten  good result from your help.

Thank you very much,

Anlee
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

728 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

14 Experts available now in Live!

Get 1:1 Help Now