//************************************** **************************************** *********//
An unhandled exception of Type 'System. exception' occurred in system. Data. oracleclient. dll
Additional information: Internal pooler error: 2
//************************************** **************************************** *********//
'''-----------------------------------------------------------------------------
''' <Summary>
'''Do all insert/update data in CAN rollback persistence
''' </Summary>
'''2007/6/26 created
''' </History>
Public sub setinsertupdatedatainpersistence (byval dT as datatable)
Log. Info ("call ")
Try
Persistence = new persistencefactory (). createinstance ()
'Persistence = factory. createinstance
'The initial state of affairs
Persistence. begintrans ()
For each Dr as datarow in DT. Rows
'Update settings (1/7)
Me. setupdatedata_no1 (DR)
'Update settings (2/7)
Me. setupdatedata_no2 (DR)
'Update settings (3/4/7)
Me. setupdatedata_no3andno4 (DR)
'Update settings (5/6/7)
Me. setupdatedata_no5andno6 (DR)
'Update settings (7/7)
Me. setupdatedata_no7 (DR)
Next
Persistence. Commit ()
Catch ex as exception
Persistence. rollback ()
Log. Fatal (ex. tostring)
Throw (Ex)
'Finally
'If not (persistence is nothing) then
'Persistence. Close ()
'End if
End try
Log. Info ("end ")
End sub
the above is a batch-processed operation. If an error exists, you must perform the rollback operation.
the quotation mark is used to solve the Code .
that is to say, after the database operation is completed, the operation source for this transaction must be disabled.
otherwise, the above strange error occurs.