Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> catastrophic Error while using MTS vs. Oracle
I'm using VB6.0 to create a class that has to run in MTS with the MDAC 2.1
ADO. Also installed is the Oracle Services for MTS. Now I wrote a function
that opens the Oracle 8i db and creates a recordset etc....
the function does work fine without mts. the function works also fine when
it's included in MTS BUT on the last statement (after context.setComplete)
'Exit Function' I've got an Visual Basic runtime error
'Catastrophic error ' and the transaction is not Completed. Here the
codesample.
Any ideas or sugestions?
Anyway thx for all tips.
Public Function gblnCreateRecordSQLXML1(ByVal xmlDOMDoc As DOMDocument) As
Boolean
'##RD if the function was finished successfully true, otherwise false
'##PD cnDBConnection represents an initialized ORADATABASE object
'##PD vrecExecuted represents an initialized ORADYNASET object containing
the data
'##PD vsSqlCmd Contains the SQL Statement to open the recordset
'##PD vlngRecCount contains the Number of records returned (not yet
supported from ADODB?)
On Error GoTo err_gblnCreateRecordSQLXML
moclsDataError.psSourceProc = "gblnExecuteSQL" moclsDataError.psSourceClass = "clsDBSelect"
Dim ob As New clsDatabase
Dim xmlElement As IXMLDOMElement
Dim sFilePath As String
Dim intFieldCount As Long
Dim cn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim ctxMTS As ObjectContext
Set ctxMTS = GetObjectContext()
Call ob.gblnOpenConnection(cn, "Provider=OraOLEDB.Oracle.1;User ID=BLA;Password=BLA;Data Source=jjj", 15, adUseClient)
MsgBox "openconnection"
Call ob.gblnOpenRecordset(cn, rst, "Select * from PMuser", adOpenDynamic, adLockBatchOptimistic, adUseClient, adCmdText)
MsgBox "rec"
rst!usr_name = "SHITTTTTTTTTTTTTTTTTTTTTTTTTTTT"rst.Update
mlngNumofRows = rst.RecordCount
mlngNumofFields = rst.Fields.Count
If Not ob.gblnCloseRecordset(rst) Then Err.Raise MYERR
MsgBox "closed rec"
If Not ob.gblnCloseConnection(cn) Then Err.Raise MYERR
MsgBox "closed cnn"
If Not ctxMTS Is Nothing Then ctxMTS.SetComplete
MsgBox "complet"
gblnCreateRecordSQLXML1 = True
MsgBox "jjjaaaaaaaaaaaaaaaaaaaa"
Exit Function
err_gblnCreateRecordSQLXML:
If Err.Number = 94 Then Resume Next
MsgBox Err.Description & Err.Number
Resume Next
If Not ctxMTS Is Nothing Then ctxMTS.SetAbort
End Function Received on Fri Nov 12 1999 - 10:03:55 CST