🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2165

?Detecting version of MDAC in code?

#2165
From: Ted Byers
Date: Thu, 30 Oct 2003 16:52
30 lines
2165 bytes
I need to know how to do this, and how to handle future changes to MDAC.

What I want is to check for the version of MDAC in the constructor of my
main form before the following statements:

  Catalog=Variant::CreateObject("ADOX.Catalog");
  Catalog.Exec(PropertySet("ActiveConnection") <<
                ("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="+AnsiString("Test.mdb")));


This code works fine, on my system (W2K), and in other functions, I can
easily extract data from any of the tables.  But my testing so far has only
been on my development machine, and I have a number of questions.

1) Am I right in expecting an error if my program is run on my sister's W98
machine if it's version of MDAC has not been updated?  This worry is what
makes me ask how I can test for this so that instead of an obscure error
message, I can advise the user to update their MDAC (MS' jet is part of
MDAC, right?).

2) Are versions of MDAC backward compatible, so a program that works with
the current version of it will also work with the next version of it?  Would
I have to alter the Provider value to take advantage of any backward
compatibility that is provided?  Or would I have to produce a new version of
the program every time there is an update to MDAC?

Cheers,

Ted
Technical Details
Message-ID: <3fa1429b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,fbd761b734b559b9,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-10-30 09:10:50 PST
From: "Ted Byers" <r.ted.byers@sympatico.ca>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ?Detecting version of MDAC in code?
Date: Thu, 30 Oct 2003 11:52:52 -0500
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 65.95.126.104
Message-ID: <3fa1429b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1067532955 65.95.126.104 (30 Oct 2003 08:55:55 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail