Solved

dao database access

Posted on 2002-05-13
3
174 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

747 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

16 Experts available now in Live!

Get 1:1 Help Now