Solved

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

Posted on 1998-08-17
2
249 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

809 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