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 |
|
afterburn
Starting Member
28 Posts |
Posted - 2003-01-17 : 20:46:53
|
| I have a paging stored procedure just like the link here[url]http://www.15seconds.com/issue/010308.htm[/url]however the paging is failing. Seems the recordset is failing and is closed. However the SP returns 0 if successfully completed or @@Error otherwise.ADO Code below fails to create open the recordset<%@ Transaction=required EnableSessionState=False Language=VBScript %><%Option ExplicitResponse.Buffer = truedim conn,rs,cmd,PageStartPageStart = Request.QueryString("PageStart")if not isNumeric(PageStart) or PageStart = "" then PageStart = 1else PageStart = CSng(PageStart)end ifSET conn = server.CreateObject("adodb.connection")set rs = server.CreateObject("adodb.recordset")set cmd = server.CreateObject("adodb.command")With conn .ConnectionString = Application("Conn") .CursorLocation = adUseClient .Open End WithWith rs .CursorLocation = adUseClient .CursorType = adOpenDynamic .LockType = adLockReadOnlyEnd WithWith cmd .ActiveConnection = Conn .CommandText = "spAdminGetOrders" .Parameters.Append .CreateParameter("@State",adInteger,adParamReturnValue) .Parameters.Append .CreateParameter("@Page",adInteger,adParamInput,4,PageStart) .Parameters.Append .CreateParameter("@Size",adInteger,adParamInput,4,25) .CommandType = adCmdStoredProc set rs = .Execute End WithResponse.Write rs.State%> |
|
|
afterburn
Starting Member
28 Posts |
Posted - 2003-01-17 : 21:55:23
|
| Nevermind it was aset nocount on set nocount offissue. |
 |
|
|
|
|
|
|
|