Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
EricSD
Starting Member
3 Posts |
Posted - 2000-12-12 : 17:43:23
|
| I may just be missing something, but can I open an adOpenStatic Record Set from a Stored Procedure and if so, how. Right now, I have tried Command.Execute and am now using RS.Open Command to get the Record Set and I've tried to set the Cursor Type before I Executed it, but it doesn't seem to be working as I can't use the MoveLast or MovePrevious or anything commands to the record set. I get an Invalid Operation error message. If this is simple, my fault, still a rookie. I made it a call function, which is was working fine before, but I want to be able to move around the record set, not just forward.Sub UseQryDHProd(Obj,Param1,Param2) Set ObjComm = Server.CreateObject("ADODB.Command") Set Obj = Server.CreateObject("ADODB.RecordSet") ObjComm.ActiveConnection = strConnect ObjComm.CommandText = "qryDHProducts" ObjComm.CommandType = adCmdStoredProc Set ObjDateBeg = ObjComm.CreateParameter("Date Begin", adVarChar, adParamInput, 50) Set ObjDHProdCode = ObjComm.CreateParameter("DH Product Code", adVarChar, adParamInput, 50) ObjComm.Parameters.Append ObjDateBeg ObjComm.Parameters.Append ObjDHProdCode ObjComm.Parameters("Date Begin") = Param1 ObjComm.Parameters("DH Product Code") = Param2 Obj.CursorType = adOpenStatic Obj.Open ObjComm Set ObjComm = NothingEnd SubEdited by - EricSD on 12/12/2000 18:06:01 |
|
|
|
|
|
|
|