Article View: borland.public.cppbuilder.database.ado
Article #1854Re: How can I find out if ADO is installed and what version?
From: Viatcheslav V. Vassiliev
Date: Sat, 24 Jan 2004 07:38
Date: Sat, 24 Jan 2004 07:38
45 lines
2474 bytes
2474 bytes
Create new ADODB.Connection object and check its Version property.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi + ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Vladimir Stefanovic" <antivari@ptt.yu> �������/�������� � ��������
���������: news:40112953@newsgroups.borland.com...
> 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:
<4012229f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!feed2.newsreader.com!newsreader.com!newshosting.com!nx02.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40112953@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,a1a5fb03d942cc7c X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-01-23 23:57:41 PST From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40112953@newsgroups.borland.com> Subject: Re: How can I find out if ADO is installed and what version? Date: Sat, 24 Jan 2004 10:38:11 +0300 Lines: 47 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 213.234.218.42 Message-ID: <4012229f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1074930335 213.234.218.42 (23 Jan 2004 23:45:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!feed2.newsreader.com!newsreader.com!newshosting.com!nx02.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail