View Single Post
  #1 (permalink)  
Old August 11th, 2008, 01:04 PM
tropicalpisces tropicalpisces is offline
Registered User
Join Date: Aug 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ICallbackEventHandler.GetCallbackResult Problem

Hello, I've been trying to use ICallbackEventHandler, it works fine with simple scripts and computations. however once I try using it with queries and stored procedure i now have problems. Below is the code i'm using for the Function GetCallbackResult() As String Implements ICallbackEventHandler.GetCallbackResult. The stored procedure spProcessTxn is called properly but suddenly ends after 10-20 seconds and the code returns a successful message, however upon checking it in the database no transaction was processed. Before trying to implement the ICallbackEventHandler the same code is called in a different function and it usually takes 4-5 minutes after executing the stored procedure.

            sqlcmd = New SqlCommand("spProcessTxn", _
                  New SqlConnection(strConn))
            sqlcmd.CommandType = CommandType.StoredProcedure
            sqlcmd.Parameters.AddWithValue("@repdateinput", strRepdate)
            'set time out to 10 minutes
            sqlcmd.CommandTimeout = 600

            Return "Transactions have been processed successfully." Catch ex As Exception
            Me.Results.ForeColor = Drawing.Color.Red
            Return "Error Processing Transactions"
        End Try