Hi,
I am doing a full manual CspTransaction using CSpMultiSQL in the foll.
fashion :
CSpTransaction tranMainLabReq = null;
CSpMultiSQL doLabTestReqAll = (CSpMultiSQL) CSpider.getDataObject
("doLabTestReqAll");
CSpMultiSQL doLabTestCellAll = (CSpMultiSQL) CSpider.getDataObject
("doLabTestCellAll");
try
{
tranMainLabReq = new CSpTransaction();
if (tranMainLabReq.begin ("dsLtrs"))
{
if ( strMode.equals("TRUE"))
{
doLabTestReqAll.setSqlTextOverrideInsert(CSpSQLObject.FULL_TEXT_OVERRIDE
);
doLabTestReqAll.setSqlTextFullInsert(strSqlStmt);
tranMainLabReq.executeInsert(doLabTestReqAll);
}
else
{
doLabTestReqAll.setSqlTextOverrideUpdate(CSpSQLObject.FULL_TEXT_OVERRIDE
);
doLabTestReqAll.setSqlTextFullUpdate(strSqlStmt);
tranMainLabReq.executeUpdate(doLabTestReqAll);
}
if (tranMainLabReq.succeeded())
{
Some more processing goes on and some dataobjects for
this transaction get executed.
------
------
------
At the end for the last
if (tranMainLabReq.succeeded ())
{
if (tranMainLabReq.isActive())
CSpLog.send(this, CSpLog.CRITICAL, "
TRANSACTION ACTIVE 10");
tranMainLabReq.commit ();
if ( tranMainLabReq.commit() )
CSpLog.send(this, CSpLog.CRITICAL,
"Transaction commited");
}
else Rollback.
}
Now the problem I am facing is it comes all the way to the log
"TRANSACTION ACTIVE 10" ( meaning the transaction is active ) but as
soon as it encounters the commit statement it gives the following
message :
spider.database.CSpTransaction.commit: Called when database transaction
is NOT 'active'. Call has been ignored
And thereafter the log "Transaction commited" is not shown. As a result
the tables are not getting updated. This is quite weird as the
transaction is showing up as active till the end but actually not
committing. I have put a log
" TRANSACTION ACTIVE n " at each tranMainLabReq.executeUpdate/Insert(
dataobject ). The flow of logic goes on after checking
(tranMainLabReq.succeeded()) .
I am not able to understand why this strange thing is happening. Are the
setSqlTextOverrideUpdate( ) or setSqlTextFullUpdate(strSqlStmt) are
failing or is there any thing else to be done which I am missing out ?
Any help would be highly appreciated.
Regards
Deepak
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]