HI,
Ive been debugging my app for hours and I can't figure out why it is doing this, I have wrote a VB app that processes messages from a database and sends them out as emails every 3 seconds.
At some point in my program I write back to the database if the send was successful/failure. On the 138 time of access it hangs! every time its 138.
Im being careful to clean out my connection:
Dim sSqlConnection As SqlConnection
Try
sSqlConnection = New SqlConnection(sConnection)
Dim sCommand As New SqlCommand(sStoredProc, sSqlConnection)
sCommand.CommandType = CommandType.StoredProcedure
If Status = 1 Then
'//Success
sCommand.Parameters.Add("@pmSuccess", 1)
Else
sCommand.Parameters.Add("@pmFailure", 1)
End If
sCommand.Parameters.Add("@pmAgentID", AgentID)
(hangs at this point) -> sSqlConnection.Open()
sCommand.ExecuteNonQuery()
Catch ex As Exception
Finally
If sSqlConnection.State = ConnectionState.Open Then
sSqlConnection.Close()
End If
End Try
It falls into the Catch Block but with NO error message, then the program just hangs.
Has anyone heard of this bizzare thing? Or anyone have any hunches on why it could be doing this/
Thanks
J
Ive been debugging my app for hours and I can't figure out why it is doing this, I have wrote a VB app that processes messages from a database and sends them out as emails every 3 seconds.
At some point in my program I write back to the database if the send was successful/failure. On the 138 time of access it hangs! every time its 138.
Im being careful to clean out my connection:
Dim sSqlConnection As SqlConnection
Try
sSqlConnection = New SqlConnection(sConnection)
Dim sCommand As New SqlCommand(sStoredProc, sSqlConnection)
sCommand.CommandType = CommandType.StoredProcedure
If Status = 1 Then
'//Success
sCommand.Parameters.Add("@pmSuccess", 1)
Else
sCommand.Parameters.Add("@pmFailure", 1)
End If
sCommand.Parameters.Add("@pmAgentID", AgentID)
(hangs at this point) -> sSqlConnection.Open()
sCommand.ExecuteNonQuery()
Catch ex As Exception
Finally
If sSqlConnection.State = ConnectionState.Open Then
sSqlConnection.Close()
End If
End Try
It falls into the Catch Block but with NO error message, then the program just hangs.
Has anyone heard of this bizzare thing? Or anyone have any hunches on why it could be doing this/
Thanks
J