fetching backward
-
hi all i open an access database from asp .. for some reason i need to know the number of records in the recordset before processing it as follows :
set con=Server.CreateObject("Adodb.Connection") set rs=Server.CreateObject("Adodb.Recordset") con.ConnectionString=strCon con.CursorLocation=1 'server con.Open set rs.ActiveConnection=con rs.CursorType=adOpenKeySet rs.open "select * from items" rs.MoveLast n=rs.RecordCount Response.Write n
i get an error : Microsoft OLE DB Provider for ODBC Drivers (0x80040E24) Rowset does not support fetching backward. can you help with this ? -
hi all i open an access database from asp .. for some reason i need to know the number of records in the recordset before processing it as follows :
set con=Server.CreateObject("Adodb.Connection") set rs=Server.CreateObject("Adodb.Recordset") con.ConnectionString=strCon con.CursorLocation=1 'server con.Open set rs.ActiveConnection=con rs.CursorType=adOpenKeySet rs.open "select * from items" rs.MoveLast n=rs.RecordCount Response.Write n
i get an error : Microsoft OLE DB Provider for ODBC Drivers (0x80040E24) Rowset does not support fetching backward. can you help with this ? -
I've already decided to use this method.. I know it but I didn't want to make 2 queries while I can use a simple property call thank you anyway :) any other ideas ?
-
I've already decided to use this method.. I know it but I didn't want to make 2 queries while I can use a simple property call thank you anyway :) any other ideas ?
You might read up on the following: o CursorType = adStatic (3) o CursorLocation = adUseClient (3) Also, when I was doing ASP, I used to use the GetRows() method to store the recordset into a multi-dimensional array. That allows you to close the recordset and connection straight away - and you can wander backwards and forwards through the array data. Andy
-
You might read up on the following: o CursorType = adStatic (3) o CursorLocation = adUseClient (3) Also, when I was doing ASP, I used to use the GetRows() method to store the recordset into a multi-dimensional array. That allows you to close the recordset and connection straight away - and you can wander backwards and forwards through the array data. Andy
Hi.. I changed the driver in the connection string from Microsoft access to: Jet 4.0 and it worked !!