• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Visual Basic 6.0 and Access 2000

Does anyone know why VB won't recognize a access 2000 database but it will recognize a access 97 db?  If so does anyone know how I can fix that?
0
bjshay
Asked:
bjshay
  • 3
  • 3
  • 2
  • +5
2 Solutions
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
spauljosephCommented:
VB 6.0 can support any version of MS Access. But the components you used to access the database will differ. For example, if you used DAO (Data Access Objects) or DataControl then it will support only up to MS Access '97 because they've written before MS Access 2000 came. But you can use ADO (ActiveX Data Objects) which are written to use with any MS Access database. This comes with the control named ADODC (ActiveX Data Objects Data Control) you can use this in your form for accessing any Access version databases. You can also use these ADO using code by just adding Microsoft ActiveX Data Objects 2.0 Library to your Project References and just place them in form as follows.

Dim con as New ADODB.Connection
Dim rst as New ADODB.RecordSet

Private Sub Form_Load()
   con.Open "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & App.path & "\YourDb.Mdb"
   rst.Open "Select * from YourTable",con,adOpenDynamic,adLockOptimistic
End Sub

'NOTE: for more information about ADO, please refer to the MSDN online at http://msdn.microsoft.com/library

0
 
Sankar_VCommented:
Download the VB6.0 Service Pack 5!

That will do the needfull!



0
Independent Software Vendors: 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!

 
CimperialiCommented:
Or goto www.Microsoft.com and make a search for "Jet" (as latest jet update is not included in latest Mdac_typ.exe)
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Some versions of VB often don't recognize the newer versions of Access but recognize the old ones. For that, you can work with the older version but you have to convert the newer version to an older version. VB will perform all transactions into that older version perfectly and you need not be bugged thinking that its an 'old' version.

Open the .mdb file in Access 2000, and go to Tools, then Database Utilities, then Convert Database, then To Prior Database Version, and specify a different filename. Use this new .mdb file for your VB program, and I think that everything should work fine.

Mayank.
0
 
sameer2010Commented:
Yes! u r right mayan! Also, note that using access 2000 u will not be able to use ADODC control. All other controls can be used though. But, still u can work with ADODB as suggested by spauljoseph.
Thanks
Sam
0
 
CleanupPingCommented:
Hi bjshay,
This old question (QID 20558207) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
GPrentice00Commented:
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I would appreciate any comments by the experts that would help me in making a recommendation.
It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp

GPrentice00
Cleanup Volunteer
0
 
Éric MoreauSenior .Net ConsultantCommented:
Recommandation: Accept emoreau's comment
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Recommendation: Accept mayankeagle's comment :-) :-)
0
 
Éric MoreauSenior .Net ConsultantCommented:
Your comment suggest that the database is converted. It is not always possible because the database must be used by older system.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Yeah, but you don't know what the case is with him. God knows whether it helped him or not. He never cared to post another comment here :-)

Mayank.
0
 
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Split between emoreau and Sankar_V

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
  • 2
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now