Solved

dao database access

Posted on 2002-05-13
3
178 Views
Last Modified: 2010-04-02
I previously had software access a access 97  database using visual c++ and the CDatabase and CRecordset, class parameters including the afxdao.h file.   This code and application was running on a windows nt machine.  When we upgraded to run on a windows 2000 system the dao object can nolonger find the jet engine.  
Now for the question.  Has the MFC class been updated to handle a access 2000 database.  Or has any one else run into this probleme and can help me determine if I am missing a dll or jet driver on the Windows 2000 system.

For further refrence I also have a VB application access a 2000 database on the windows 2000 system that functions fine.  The visual studio 6.0 was used to develope all applications.  

0
Comment
Question by:LBoorn
[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
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 200 total points
ID: 7007292
To test base connectivity, I use this technique:

1) Use the AppWizard to create a dialog-based App

2) Press Ctrl+W and click [Add Class]>>New

3) Name: CRsTest    Base class: CDaoRecordSet [OK]

4) In the next step, you should be alble to locate the mdb file and the ClassWizard should be able provide a list of tables and you cshould be able to bind all of the columns.

5) In an OnButton handle, use simple code like:

CRsTest crs;
crs.Open();

and you can use the debugger to examine the crs object and you should see data from the database.

=--=-==-=-=-=-=-=-
If step 4 fails, then the DBMS is not setup correctly.  You can try using the Control Panel / ODBC applet to see if ODBC is able to talk to the database.  You can try re-installing Access and MDAC.  

Describe what happens when you try these things, and I'll help you diagnose the problem.

-- Dan
0
 

Author Comment

by:LBoorn
ID: 7008444
Thank you for your response,  After further digging we found that the MDAC did not have the correct jet database drivers.  We updated our Windows 2000 and MDAC and the application operates correctly so far.  I will post again if we experience further problemes.
0
 

Author Comment

by:LBoorn
ID: 7008447
Thank You for your help.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

689 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