Solved

dao database access

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find boost header files using gnu make (MinGW) on Win 7 11 86
Prototype for MessageDlg in Embacadero XE 2 2 37
C++ get user from AD  (VS6) 7 72
Precision Problem in C++ 7 31
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

815 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

11 Experts available now in Live!

Get 1:1 Help Now