I have stored procedure that I have to run in an ASP page that once get it's 2 input parameters then outputs a table (the result). How do I specify the output parameters of the stored procedure to display the result in an HTML table format ?
method I am using to connect is and run the procedure is this:
dim connstring, conn, cmdDetails, itemVar, descriptionVar
ConnString = "Provider=sqloledb;Data Source=*********;Initial Catalog=*********;User Id=*******;Password=*********;"
Set conn = Server.CreateObject("ADODB.Connection")
Set cmdDetails = Server.CreateObject("ADODB.Command")
conn.Open ConnString
cmdDetails.CommandText = "sp_WebItemLookup"
cmdDetails.ActiveConnection = Conn
cmdDetails.CommandType = adCmdStoredProc
cmdDetails.Parameters.Append cmdDetails.CreateParameter("@item",adVarChar,adParamInput,128,item)
cmdDetails.Parameters.Append cmdDetails.CreateParameter("@description",adVarChar, adParamInput,128,plist)
cmdDetails.execute
conn.close
set conn = nothing
set cmdDetails = nothing
the procedure accepts 2 parameters Item and Description and then outputs a result table with column names: Item, Description,SerialNumber,Quantity,cost,Warehouse,Bin,
stocktype,WarehouseType,InventoryContact,City.
I did it before without using stored procedures just by creating a recordset and looping through it but with this stored procedure stuff I got confused about the output.
Experts please help me out.
method I am using to connect is and run the procedure is this:
dim connstring, conn, cmdDetails, itemVar, descriptionVar
ConnString = "Provider=sqloledb;Data Source=*********;Initial Catalog=*********;User Id=*******;Password=*********;"
Set conn = Server.CreateObject("ADODB.Connection")
Set cmdDetails = Server.CreateObject("ADODB.Command")
conn.Open ConnString
cmdDetails.CommandText = "sp_WebItemLookup"
cmdDetails.ActiveConnection = Conn
cmdDetails.CommandType = adCmdStoredProc
cmdDetails.Parameters.Append cmdDetails.CreateParameter("@item",adVarChar,adParamInput,128,item)
cmdDetails.Parameters.Append cmdDetails.CreateParameter("@description",adVarChar, adParamInput,128,plist)
cmdDetails.execute
conn.close
set conn = nothing
set cmdDetails = nothing
the procedure accepts 2 parameters Item and Description and then outputs a result table with column names: Item, Description,SerialNumber,Quantity,cost,Warehouse,Bin,
stocktype,WarehouseType,InventoryContact,City.
I did it before without using stored procedures just by creating a recordset and looping through it but with this stored procedure stuff I got confused about the output.
Experts please help me out.