My company is using Legacy ASP with VB script.
The code I am testing to try and count the rows in a stored procedure is as follows:
If Not isNull(dblOrderMasterID) then
Set cmdAttachCount = Server.CreateObject("ADODB.Command")
cmdAttachCount.ActiveConnection = cnn
'cmdAttachCount.CommandText = "SP_OrderGetAttchID"
'cmdAttachCount.CommandType = adCmdStoredProc
'prm.Append cmdAttachCount.CreateParameter("@u_order_master_id", adNumeric, adParamInput,,dblOrderMasterID)
'Set rstAttchCount = Server.CreateObject("ADODB.Recordset")
'Set rstAttchCount = cmdAttachCount.Execute
intAttachCount = cmdAttachCount.Execute("SELECT COUNT(*) FROM SP_OrderGetAttchID @u_order_master_id;").Fields(0)
End IfInline Code Example Here
Unforunately it keeps crashing the webpage.