Article View: borland.public.cppbuilder.database.ado
Article #1861Re: How can I find out if ADO is installed and what version?
From: Matt Jacobs
Date: Sun, 25 Jan 2004 06:36
Date: Sun, 25 Jan 2004 06:36
31 lines
1632 bytes
1632 bytes
"Vladimir Stefanovic" <spam@not.needed> wrote:
#include <utilcls.h>
void foo()
{
char s[80];
CoInitialize(NULL);
try
{
Variant varConn;
AnsiString s;
varConn = Variant::CreateObject("ADODB.Connection");
s = AnsiString(varConn.OlePropertyGet("Version"));
varConn.Clear();
ShowMessage(AnsiString("ADO Version = ") + s);
}
catch ( EOleSysError& e )
{
sprintf(s, "%08Xh", e.ErrorCode);
ShowMessage(AnsiString("Error ") + s + " - " + e.Message);
}
catch ( Exception& e )
{
ShowMessage(e.Message);
}
CoUninitialize();
}
Technical Details
Message-ID:
<ato6105ogp82k4he3nqd0ommmun7p485i4@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40112953@newsgroups.borland.com> <4012229f$1@newsgroups.borland.com> <40128353$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,a1a5fb03d942cc7c X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-01-24 22:39:29 PST From: Matt Jacobs <noyb@noyb.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: How can I find out if ADO is installed and what version? Date: Sat, 24 Jan 2004 22:36:09 -0800 Reply-To: __noyb@noyb.com Message-ID: <ato6105ogp82k4he3nqd0ommmun7p485i4@4ax.com> References: <40112953@newsgroups.borland.com> <4012229f$1@newsgroups.borland.com> <40128353$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.4.248.124 X-Trace: newsgroups.borland.com 1075012560 24.4.248.124 (24 Jan 2004 22:36:00 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail