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
Solved

Accessing fields in a .mdb file without opening MSAccess window application.

Posted on 1998-08-17
2
250 Views
Last Modified: 2011-04-14
How can I open a .mdb(MSAccess) file and get to the individual field entries in my c++ program. What is the name of the Access DLL where the functions are located. My goal is to use the Access DLL without opening the MSAccess window application to get at the information in the .mdb file. I want to be able to get at each record and gather the data from every field in the records. Also, where is the API list of functions for the Access DLL published.
0
Comment
Question by:kns2
2 Comments
 
LVL 1

Accepted Solution

by:
JayMerritt earned 50 total points
ID: 1959322
The term you are looking for is DAO - Data Access Objects.

These are located in:
  \Program Files\Common Files\Microsoft Shared\DAO

Look at the DAO35.hlp for more.

Visual Basic has a lot of documentation on how to get the database schema for an MDB file.
0
 
LVL 1

Expert Comment

by:rlarner
ID: 1959323
Are you _SURE_ you want to do this?  I assume you are not using MS C++ libraries -- otherwise you should be using either the DAO classes or the ODBC classes (e.g. CDaoTableDef will allow you to find out all the fields for a given table in DAO.  You must do something a little more complex for the non-DAO version -- MSDEV 5.0 comes with an example called CATALOG which implements a class that will give you the desired information.)  So far, I have prefered DAO -- it seems to be a more complete implementation.

If you are NOT using MFC, then the name of the dll that you want actually depends on the version of access you want to use.  I can give you a pointer, however -- MS Access is built using something called the Jet database engine.  On my system, I have msjet35.dll, which is what Access 97 uses.  (95 should have msjet30.dll, and 2.0 has msjet20.dll I believe.  I'm not too sure about the last one)  For the API, I am not to sure where to find exact documentation.  I don't actually recommend this solution -- from what little I have seen of the API from stepping through DAO objects, it is not a very pretty interface.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

840 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