Curt,
The transaction should begin when it is put inside the if clause
shouldn't it ? Only after then can it return true or false.
Anyway I put tranMainLabReq.begin("dsLtrs") before the if clause. The
message it gives is :
spider.database.CSpTransaction.begin(CSpDateSource): Called when
database transaction is still 'active'. The current active one is
automatically 'rolledback'
The previous message is still there :
spider.database.CSpTransaction.commit: Called when database transaction
is NOT 'active'. Call has been ignored
Why is this message coming even when the transaction is active ?
Thanks
Deepak
-----Original Message-----
From: Curt Springer
[mailto:[EMAIL PROTECTED]]
Sent: Friday, June 11, 1999 9:32 PM
To:
[EMAIL PROTECTED]
Subject: Re: [ND] CSPTransaction not working in
full manual mode
You need to execute 'begin' on your CSpTransaction to
begin the transaction.
-- Curt Springer, Team ND
At 08:26 PM 6/11/99 +0530, Deepak Kumar Adhikary wrote:
>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_OVERRID
E
>);
>
>doLabTestReqAll.setSqlTextFullInsert(strSqlStmt);
>
tranMainLabReq.executeInsert(doLabTestReqAll);
> }
> else
> {
>
>doLabTestReqAll.setSqlTextOverrideUpdate(CSpSQLObject.FULL_TEXT_OVERRID
E
>);
>
>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]
>
________________________________________________________________________
_
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]
_________________________________________________________________________
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]