473,804 Members | 3,209 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
"Unrecogniz ed 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 5840
On Jun 11 2004, 08:15 pm, bf****@yahoo.co m (david) wrote in
news:a1******** *************** ***@posting.goo gle.com:
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.co m (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
41238
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 cannot create new pages - either trough the GUI, or by creating a new WikiName and clicking on it. I'm stumped as to whether this is a Moin ACL problem (played around a lot with this, but to no avail) or perhaps an IIS config problem (though...
1
2664
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 that says: 'There was a problem retrieving printer information for this object. The object may have been sent to a printer that was unavailable.' When I choose 'report wizard', I can go through all of the steps but then I get an error message...
7
8876
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
5
2932
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 using as there are many choices to choose from. My database will contain a lot of records. TIA
6
13735
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 error (seems to be happening when I try creating a directory) If dirmgr.Exists("s:\blah\" & txt_name.Text) Then lblerror.Text = lblerror.Text & "Unable to build physical path. " &
0
1564
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 have worked in my case so far. I'd appreciate any help anyone can offer! Here's the problem: When attempting to create a new ASP.NET Web project on my *local*
8
9765
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 problem: my vb.net program has problems with UNC. If the UNC server is restarted or goes off-line, my VB.net program crashes. The code for UNC access to the file is included below and is put in the tick event of a form timer control running every...
6
3381
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) I installed FrontPage server extensions to IIS on my computer while following instructions in a Microsoft ASP.Net MCSD training book. After installing the FrontPage Server Extensions I cannot create a new
4
13010
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 into an xml file to create the RSS feed, so when users upload a news story it automatically updates in the xml file. Can this be done with asp? and where should I look for more information. Thanks, This is a great group. -- Posted via a free...
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4302
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 we have to send another system
2
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.