J
Jeremy
Hi, I am having a problem running an sql stored procedure with
ADO/ASP. If I hard code a select statement, the code works, but when
I try to use a stored procedure it bombs. Here is my code:
THIS WORKS:
sql="SELECT PartNumber FROM Scrap WHERE DateOpened BETWEEN '20030601',
'20030605'"
'Note: I already did my connection object above
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
THIS DOES NOT:
'my stored procedure is LC_Top50_ByCost
sql="LC_Top50_ByCost 'DB', '20030601', '20030605'"
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
HERE IS THE ERROR:
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/MyWeb/T10_Cost.asp, line 202
Line 202 is the first line that I try to access the data in the
recordset.
Any help would be wonderful, thank you
-Jeremy
ADO/ASP. If I hard code a select statement, the code works, but when
I try to use a stored procedure it bombs. Here is my code:
THIS WORKS:
sql="SELECT PartNumber FROM Scrap WHERE DateOpened BETWEEN '20030601',
'20030605'"
'Note: I already did my connection object above
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
THIS DOES NOT:
'my stored procedure is LC_Top50_ByCost
sql="LC_Top50_ByCost 'DB', '20030601', '20030605'"
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
HERE IS THE ERROR:
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/MyWeb/T10_Cost.asp, line 202
Line 202 is the first line that I try to access the data in the
recordset.
Any help would be wonderful, thank you
-Jeremy