🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages Started by Kevin Saliga Sat, 10 Feb 2001 23:03
Connection Busy with Results from Another Command
#5775
Author: 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;
   }
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads