×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

COM+ and db-triggers

COM+ and db-triggers

COM+ and db-triggers

(OP)
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):  

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
Seperate class where I build the sql-string:

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
And finally the call from ASP:

CODE

dim objRequestDAT
strMld = request.querystring("melding")
set objRequestDAT = Server.CreateObject("ComWebservice.clsRequestDAT")
boolValue = objRequestDAT.delRequest(strMld)
set objRequestDAT = nothing
How to solve this problem in COM+? Tnx.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close