Hello I am new to this could someone please tell me how to retrieve the last record in a table?<BR>when I use rs.movelast it says Rowset does not support fetching backward. <BR>thanks,<BR>john
Or, just return a recordset that only returns the record that you need (assuming that you aren't doing something else with the recordset).
thanks but how would i return just the last one?<BR>thanks,<BR>john
sql server enterprise manager
SELECT TOP 1 YourFields<BR>FROM YourTable<BR>ORDER BY SameOrderBy DESC<BR><BR>(Or, if you are already ordering by DESC, order by ASC).<BR><BR>Basically, you want the recordset in reverse order, but you only want 1 (TOP 1) record.
thanks a million that will help i couldnt figure that out for some reason lol<BR>thanks,<BR>john