Article View: borland.public.cppbuilder.database.ado
Article #1849How can I find out if ADO is installed and what version?
From: Vladimir Stefanovic
Date: Fri, 23 Jan 2004 14:00
Date: Fri, 23 Jan 2004 14:00
31 lines
1711 bytes
1711 bytes
I have already written some code (see below) that checks Registry
entries. Unfortunately, not all Win systems (98 Millennium) have these
entries in the same place, so the code is completely unreliable.
Furthermore if the entries are in the same place, some programs when
installed just change these entries (M$ VC++ 6), so this code is much
more unreliable :)
AnsiString GetADOVersion()
{
AnsiString RESULT = "0";
bool exists = false;
TRegistry *Reg = new TRegistry( KEY_READ );
try
{
Reg->RootKey = HKEY_LOCAL_MACHINE;
exists = Reg->OpenKey( "Software\\Microsoft\\DataAccess\\", false );
if ( exists )
RESULT = Reg->ReadString ( "Version" );
}
__finally
{
delete Reg;
return ( RESULT );
}
}
Thanks,
Vladimir Stefanovic.
Technical Details
Message-ID:
<40112953@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-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,a1a5fb03d942cc7c,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-01-23 06:10:04 PST From: "Vladimir Stefanovic" <antivari@ptt.yu> Newsgroups: borland.public.cppbuilder.database.ado Subject: How can I find out if ADO is installed and what version? Date: Fri, 23 Jan 2004 15:00:58 +0100 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 213.137.116.236 Message-ID: <40112953@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1074866515 213.137.116.236 (23 Jan 2004 06:01: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