Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbee 1st cursor, should the resultset show up 1 per record?

Status
Not open for further replies.

Big1934

Programmer
Jul 1, 2009
33
US
screen shot attached
 
?????????????

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Cursors run one record at a time, so if you are selecting results from the cursor, yes they will show up only one record ata time. If the result of your cusor is just a select, likely you do not need and do not want to use a cursor. Cursors should almost never be used for select, insert, update or delete as they are extremely slow.

"NOTHING is more important in a database than integrity." ESquared
 
They return one record at a time but there are some options for that. Check out BOL.

FETCH
[ [ NEXT | PRIOR | FIRST | LAST
| ABSOLUTE { n | @nvar }
| RELATIVE { n | @nvar }
]
FROM
]
{ { [ GLOBAL ] cursor_name } | @cursor_variable_name }
[ INTO @variable_name [ ,...n ] ]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top