Connection is busy with results for another command
From: paracio (lucas.paracio_at_gmail.com)
Date: 01/26/05
- Next message: misan: "oledb compatiable ? thanks........"
- Previous message: Kevin Fenters: "RE: Thanks everyone"
- Next in thread: Erland Sommarskog: "Re: Connection is busy with results for another command"
- Reply: Erland Sommarskog: "Re: Connection is busy with results for another command"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: misan: "oledb compatiable ? thanks........"
- Previous message: Kevin Fenters: "RE: Thanks everyone"
- Next in thread: Erland Sommarskog: "Re: Connection is busy with results for another command"
- Reply: Erland Sommarskog: "Re: Connection is busy with results for another command"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|