Connection is busy with results for another command

From: paracio (lucas.paracio_at_gmail.com)
Date: 01/26/05


Date: 25 Jan 2005 20:57:54 -0800

Hi,

I want to insert thousand of records using oledb provider, insert
command is under transaction. once insert failed, system will rollback,
otherwise will commit.

the problem is, sometimes insert prcoess failed (for the SAME records)
and the exception form oledbexction is "Connection is busy with results
for another command"

the structure of code follow like this :
foreach(DataRow dr in dtblInput.Rows )
{
strSQL = GenerateQuery(dr,strTableName); //<--- generate qry
OleDbCommand cmdTemp = new OleDbCommand();
cmdTemp.CommandType = CommandType.Text ;
cmdTemp.CommandText = strSQL;
cmdTemp.Transaction = tranTax; //<-- my transaction
cmdTemp.Connection = tranTax.Connection;
cmdTemp.Prepare() ;
int intRet = cmdTemp.ExecuteNonQuery() ;

cmdTemp.Dispose() ;
}

help.. pLEASe............

TIA,
Lucas



Relevant Pages

  • Re: [Info-Ingres] commit question
    ... The next block has been turned into a rollback ... hence the next command executed is the rollback and not the commit. ... The situation we had was that the "modify to truncate" command succeeded ...
    (comp.databases.ingres)
  • Re: update rollback ... in theory
    ... would i need to roll the command into a transaction somehow? ... each statement is in an implicit transaction and will be irreversible if you make a mistake. ... I generally recommend an explicit transaction for ad-hoc statements so that you can commit or rollback as desired. ...
    (microsoft.public.sqlserver.server)
  • Timeout regression introduced by 242f9dcb8ba6f68fcd217a119a7648a4f69290e9
    ... Commit 242f9dcb8ba6f68fcd217a119a7648a4f69290e9 introduces a strange ... pointer from the issued command onto eh_cmd_q breaking libata EH ... ata2.00: XXX skipping completion ... ata2: hard resetting link ...
    (Linux-Kernel)
  • Re: Multiple concurrent isolated transactions on ADO Dataset
    ... When a command is called, the GetData is called, and the ... transaction which succeeds or fails. ... > on 89 - just in the small dataset that contains the seat reservation ... >> commit), whilst the unchanged version should be visible to all other ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: CommitBatchSize vs. CommitBatchThreshold for transactional dis
    ... I strongly suspect this 1 off command is the commit command. ... Commithreshold is honored at a transaction boundary. ... With regard to the threshold adding one more command that seems to be a bug. ...
    (microsoft.public.sqlserver.replication)