473,508 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create MDB file according to the version of the Access installed

I'm developing a Visual C++ database application which will be
delivered to customers. Some customers install Access 97 on their
computers, others install Acess 2000 or higher versions.

In my application, I need to create a MDB file, according to the
Access version installed on the customers' computers so that they can
use Access to open the created MDB file without errors such as
"Unrecognized file format".

More specificly, my application will call DAO 3.5 to create a Jet 3.0
MDB file if it detects an Access 97 is installed on the customer's
computer. Otherwise, it will call DAO 3.6 to create a Jet 4.0 MDB file
for Access 2000 or higher versions.

I'm using CDaoDatabase, CDataRecordset to operate the MDB databases
and the MFC library is linked staticlly. I try to browse MSDN but it
seems that the only way to invoke Dao 3.6 is to modify the definition
of MFC_VERSION:

#undef _MFC_VER
#define _MFC_VER 0x0601

and rebuild the MFC library. But in that case, my application will use
DAO 3.6 staticlly and can not call DAO 3.5 if only Access 97 is
installed on the customers' computers.

Can anyone help me?
Nov 13 '05 #1
2 5826
On Jun 11 2004, 08:15 pm, bf****@yahoo.com (david) wrote in
news:a1**************************@posting.google.c om:
More specificly, my application will call DAO 3.5 to create a Jet 3.0
MDB file if it detects an Access 97 is installed on the customer's
computer. Otherwise, it will call DAO 3.6 to create a Jet 4.0 MDB file
for Access 2000 or higher versions.

I'm using CDaoDatabase, CDataRecordset to operate the MDB databases
and the MFC library is linked staticlly. I try to browse MSDN but it
seems that the only way to invoke Dao 3.6 is to modify the definition
of MFC_VERSION:

#undef _MFC_VER
#define _MFC_VER 0x0601

and rebuild the MFC library. But in that case, my application will use
DAO 3.6 staticlly and can not call DAO 3.5 if only Access 97 is
installed on the customers' computers.


I have no idea how this is applicable to a C++ application such as you
describe, but the CreateDatabase method of DAO 3.6 supports both
dbVersion30 (0x20) and dbVersion40 (0x40) constants in its Options
argument. In other words, you can use only DAO 3.6 and still be able to
create Jet 3.5 databases.

--
remove a 9 to reply by email
Nov 13 '05 #2
bf****@yahoo.com (david) wrote:
I'm using CDaoDatabase, CDataRecordset to operate the MDB databases
and the MFC library is linked staticlly. I try to browse MSDN but it
seems that the only way to invoke Dao 3.6 is to modify the definition
of MFC_VERSION:

#undef _MFC_VER
#define _MFC_VER 0x0601

and rebuild the MFC library. But in that case, my application will use
DAO 3.6 staticlly and can not call DAO 3.5 if only Access 97 is
installed on the customers' computers.


I can't speak for C++ but I know in VB you can use DAO with late binding. So I try
to open an MDB using DAO 3.6 and if that fails then I try DAO 3.5.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
40011
by: ferg | last post by:
I've checked all the FAQs and help - spent a couple of hours on this now and it's really bugging me. I've got Moin 1.3.5 installed on IIS 5.0. I can view and edit pages without any problems, but...
1
2634
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
7
8822
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
5
2913
by: Roy Gourgi | last post by:
Hi, I am used to working in Visual FoxPro and I would like to be able to create a database and store and retrieve information from it. What is the simplest way to do it and what should I be...
6
13692
by: Chad Crowder | last post by:
Getting the following error on my production server whether the file exists or not: "System.IO.IOException: Cannot create a file when that file already exists." Here's the code generating the...
0
1553
by: Mr. Land | last post by:
Hello. I'm having trouble creating a new Web project using VS .NET 2003 on the local default web. I've done a lot of research about this and found a lot of suggestions, but none of them seem to...
8
9699
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
6
3349
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
4
12978
by: Billy Barth | last post by:
I would like to create a RSS feed from my Access Database. I have an Access table for news which has the article title, date, and story in it. What I would like to do is pull the data from there...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.