I'm new to cursors and I'm having a really hard time understanding them.
I have a vb app form, on which there are navigational buttons with which I would like to move through a recordset.
I created a cursor with a simple select statement which retrieves only 1 cursor, which I understand is forward-only due to .MoveLast not working ("Rowset does not support fetching backward").
Here is the stored proc:
CREATE PROCEDURE sp_Charts_GetQ
declare sp_Charts_GetQ_cursor cursor
--dynamic --error on rs.MoveNext
for select CHART.* from CHART order by CHART.Series, CHART.[Sheet Name], CHART.[Sheet No], CHART.[Part No]
fetch next from sp_Charts_GetQ_cursor
How do I get the next row from the cursor when I call [recordset].MoveNext?
How do I get the last row from the cursor when I call [recordset].MoveLast? Etc..
Thank you very much indeed.
By the way, why are cursors so much better than embedded SQL?