Article View: borland.public.cppbuilder.database.ado
Article #477Re: Removing TADOConnection Active = true flag on startup?
From: Bud Manz
Date: Mon, 22 May 2006 23:43
Date: Mon, 22 May 2006 23:43
21 lines
1483 bytes
1483 bytes
Dean Brown wrote:
> Anyone know if it's possible to dynamically set the TADOConnection.Active
> flag to false if its accidentally left on, before the program attempts to
> make the connection at startup? Its a gotcha that keeps getting us during
> general testing.
>
> Thanks for any help,
>
> Dean
Try checking the TADOConnection.Connected to see if it's true, if it's
not, then set it on...
if(!ADOConnection1->Connected)
{
ADOConnection1->Active = true;
}
This code is untested and I'm not sure if it's proper... use the idea!
HTH,
Bud
Technical Details
Message-ID:
<44724c9a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<Xns97BF929E83309DeanBrown3D@207.105.83.66>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,9ef3e688ad6a6f35 X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 22 May 2006 19:43:21 -0400 From: Bud Manz <amanz@northweststate.edu> User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: Removing TADOConnection Active = true flag on startup? References: <Xns97BF929E83309DeanBrown3D@207.105.83.66> In-Reply-To: <Xns97BF929E83309DeanBrown3D@207.105.83.66> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 205.133.102.173 Message-ID: <44724c9a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1148341402 205.133.102.173 (22 May 2006 16:43:22 -0700) Lines: 21 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail