Recently I'm developing an webservice to replace an existing c/s-application. In the used database are triggers inserted. They all work fine in MS SQLserver and Oracle. But when I now want to call a trigger in COM+ I get the error message (logError):
Error -2147217900 : 01-03-2004 11:20:48
- Description: delRequest(DAT): 'Cannot use SAVE TRANSACTION within a distributed transaction.'
This is what I've got so far in COM+(DAT-component):
Seperate class where I build the sql-string:
And finally the call from ASP:
How to solve this problem in COM+? Tnx.
Error -2147217900 : 01-03-2004 11:20:48
- Description: delRequest(DAT): 'Cannot use SAVE TRANSACTION within a distributed transaction.'
This is what I've got so far in COM+(DAT-component):
Code:
Public Function delRequest(ByVal reqId As String) As Boolean
Dim strSQL As String
On Error GoTo delRequest_Error
'Create the database objects required .
Set cnConn = New ADODB.Connection
' open the connection
GetConnection cnConn
strSQL = getDeleteRequestSQL(reqId)
10 cnConn.Execute strSQL, , adExecuteNoRecords
delRequest = True
SetComplete
CloseConnection cnConn
Exit Function
delRequest_Error:
CloseConnection cnConn
SetAbort
delRequest = False
'log the error
logError Err.Number, "delRequest(DAT): '" & Err.Description & "'", Erl()
End Function
Code:
Function getDeleteRequestSQL(ByRef strRequestId As String) As String
Dim strSQL As String
strSQL = "DELETE FROM thmld2 WHERE right(hdmcode,8)='" & strRequestId & "'"
getDeleteRequestSQL = strSQL
End Function
Code:
dim objRequestDAT
strMld = request.querystring("melding")
set objRequestDAT = Server.CreateObject("ComWebservice.clsRequestDAT")
boolValue = objRequestDAT.delRequest(strMld)
set objRequestDAT = nothing