Hi everybody!
I have here a small dilema.
I try to run a stored procedure from the command object and return a recordset. Everything works fine. After that with the recordset.recordcount method I need to return the nr of records.
set cmd = Server.CreateObject("ADODB.Command"
cmd.ActiveConnection = "Provider=SQLOLEDB;Server=local;Database=INTRA;UID=sa;PWD="
cmd.CommandText = "sp_inventory"
cmd.CommandType = 4
cmd.Parameters.Append cmd.CreateParameter("@clickclass",129,1,2,"AC"
Set objRS = cmd.Execute
But because the rcordset is forwardonly and readonly the recordcount will return -1. How can I declare the type of cursor, cursor location, etc for this recordset in this code so that I can return the number of records?
Thanks a lot,
Contra
I have here a small dilema.
I try to run a stored procedure from the command object and return a recordset. Everything works fine. After that with the recordset.recordcount method I need to return the nr of records.
set cmd = Server.CreateObject("ADODB.Command"
cmd.ActiveConnection = "Provider=SQLOLEDB;Server=local;Database=INTRA;UID=sa;PWD="
cmd.CommandText = "sp_inventory"
cmd.CommandType = 4
cmd.Parameters.Append cmd.CreateParameter("@clickclass",129,1,2,"AC"
Set objRS = cmd.Execute
But because the rcordset is forwardonly and readonly the recordcount will return -1. How can I declare the type of cursor, cursor location, etc for this recordset in this code so that I can return the number of records?
Thanks a lot,
Contra