🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Strange behaviour of ADOConnection

#1323
From: Viatcheslav V. Vassiliev
Date: Wed, 18 Aug 2004 06:36
46 lines
2294 bytes
ADO maintains connection pool, so when you disconnect it does not actually
release connection. Try to add "OLE DB Services=-2" to your connection
string.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Francesco" <.> ???????/???????? ? ???????? ?????????:
news:41226f7a@newsgroups.borland.com...
> Hello,
>
> I've an ADOConnection, I've noticed that once connected even if I
> disconnect, the DB is still in use.
> I'll explain better:
>
>
> I've an ADOConnection that connect to a database as specified in
> ConnectionString
>
> ADOConnection1->Connected = true;
>
> I do smth with ADOQuery connected to that ADOConnection for example a
> select from table 1...
>
>
> after that I close the Query and the connection too
>
> ADOQuery1->Close();
> ADOConnection1->Connected = false;
>
> Now if I try to connect directly to database using another ADOQuery and
> putting directly the connection string in the query and I do smth that
> I need to have the exclusive access to DB (for example checking a
> table).
>
> I've an error saying that the Database is still in use.
>
>
> Am I forgetting anything or is a bug? Any Idea?
>
> thanks, Francesco
Technical Details
Message-ID: <4122f908@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41226f7a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,323a17fad324853a
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <41226f7a@newsgroups.borland.com>
Subject: Re: Strange behaviour of ADOConnection
Date: Wed, 18 Aug 2004 10:36:45 +0400
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 213.234.218.42
Message-ID: <4122f908@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1092811016 213.234.218.42 (17 Aug 2004 23:36:56 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail