开发者

Debugging ASP Stored Procedure Calls

开发者 https://www.devze.com 2022-12-13 11:52 出处:网络
I\'m using the following code block to call a SQL Server 2005 stored procedure.开发者_如何学运维 The problem is the call will intermittently fail. How can I obtain more verbose information about the c

I'm using the following code block to call a SQL Server 2005 stored procedure.开发者_如何学运维 The problem is the call will intermittently fail. How can I obtain more verbose information about the case of the failure. I've tested the SP with the failing input and found no issues. This would seems to indicate an error on the ASP side.

Set rsOrderItems = Server.CreateObject("ADODB.Recordset")
rsOrderItems.ActiveConnection = MM_SkateSeason_Connect
rsOrderItems.CursorType = 0
rsOrderItems.CursorLocation = 2
rsOrderItems.LockType = 1
rsOrderItems.Source = "{call dbo.upOrder_InsertNew('" & MM_OrderString & "')}"
on error resume next   
rsOrderItems.Open


if (rsOrderItems.State) then
else
    FAILS HERE
    InsertOrder = "Order Failed. 2"
end if


The Connection object has an Errors collection you can spin through:

For Each errorObject In MM_SkateSeason_Connect.Errors
    Debug.Print "Description :"; errorObject.Description
    Debug.Print "Number:"; errorObject.Number
Next
0

精彩评论

暂无评论...
验证码 换一张
取 消