开发者

Debugging ASP Stored Procedure Calls

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜