🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Strange behaviour of ADOConnection

#1324
From: Francesco
Date: Wed, 18 Aug 2004 07:16
56 lines
2392 bytes
Thanks a lot Viatcheslav, with your advise I solved the problem greatly.

           Francesco




Viatcheslav V. Vassiliev wrote:

> 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: <41230234@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41226f7a@newsgroups.borland.com> <4122f908@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: "Francesco" <.>
Subject: Re: Strange behaviour of ADOConnection
Newsgroups: borland.public.cppbuilder.database.ado
References: <41226f7a@newsgroups.borland.com> <4122f908@newsgroups.borland.com>
User-Agent: XanaNews/1.16.3.1
NNTP-Posting-Host: 217.172.212.72
Message-ID: <41230234@newsgroups.borland.com>
Date: 18 Aug 2004 00:16:04 -0700
X-Trace: newsgroups.borland.com 1092813364 217.172.212.72 (18 Aug 2004 00:16:04 -0700)
Lines: 57
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail