🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Connection Busy with Results from Another Command

#5775
From: Kevin Saliga
Date: Sat, 10 Feb 2001 23:03
24 lines
1575 bytes
I have a multi-threaded application that is using a single Connection object
to access the database.  I have read that I need to place code to open an
ADO dataset in a critical section to prevent the error "Connection busy with
results from another command."  To do this, I created the routine below,
which I call whenever I want to open a dataset, but I still get the error.
I have updated to the SP1 of BCB5 and installed MDAC2.6 and the MDAC update
to BCB5.  Any ideas?

Kevin Saliga

void __fastcall OpenDataSet(TCustomADODataSet* DS)
{
   TCriticalSection* CS = new TCriticalSection();
   try
   {
      CS->Acquire();
      DS->Open();
      CS->Release();
   }
   __finally
   {
      delete CS;
   }
}
Technical Details
Message-ID: <964g9l$1li9@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,cc2ad9f96f29ac80,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-02-10 14:47:21 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: "Kevin Saliga" <ksaliga@emdat.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Connection Busy with Results from Another Command
Date: Sat, 10 Feb 2001 17:03:46 -0600
Organization: Another Netscape Collabra Server User
Lines: 27
Message-ID: <964g9l$1li9@bornews.inprise.com>
NNTP-Posting-Host: adsl-pool45-130.chicago.il.ameritech.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400