Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Problem with CAPI.Exec()
Robert_Davies_(unlondonadmin_-_(deleted))
The following statement fromDiscussion:Discussion Root:TopicPkg:ReadListPut()is causing me a problem.result = CAPI.Exec( \ dbConnect.fConnection, \ "update DReadList set ReadList=:A1 where UserID=:A2 and OwnerID=:A3", \ Str.ValueToString( readList ), \ dapiCtx.fUserID, \ volumeID )when I pass in a readList of "{}". Although the result is '1' which doesn't seem to be an error - the following IsError(result) isn't tripped - the database is not updated.I am also getting intermitent error messages in the browser of 'Transaction Not Committed'. I have traced these to code in the ExecuteWithLogin() handler, but am not sure why the transaction hasn't been committed. Again I don't see any error messages when I am talking to the database.Has anyone else seen similar behaviour? Have any suggestions?Best regards/matt.
Find more posts tagged with
Comments
Rita_Chandra_(CGIUser1_(Delete)_2145449)
I am receiving the same "Transaction Not Committed" errors. I am currently investigating this, if you find a resolution would you mind forwarding me some of your notes?Thx. Rita Chandra (rita.chandra@cgi.ca)
Application_Services_FUJITSU_(fuji_ware05_-_(delet
Let me guess, you are using an Oracle Database?When you use Oracle, you should execute the commit as well, certainly when updating the database.Kind regardsJohanMore info: mailto:jraedemaeker@switch.be
Marie_Lindsay_(MLindsay_(Delete)_15608)
Are you starting a transaction with CAPI.StartTransaction(), then running the CAPI.Exec() calls, then committing the transaction with CAPI.EndTransaction()? This is the recommended way of processing transactions. If you are sending CAPI.Exec() calls from a request handler's Execute() method, then you can use two features of the request handler (what are their names, something like StartTrans() and EndTrans()). The EndTrans() method checks whether you have populated the fError feature to determine whether to commit or rollback.Hope that's useful to you.