Solved

dao database access

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

863 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

28 Experts available now in Live!

Get 1:1 Help Now