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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cycle through records in dataset

Status
Not open for further replies.

jrwinterburn

IS-IT--Management
Jul 26, 2004
72
GB
Hi Guys,

Another query! I have a windows form that has a dataset in it which has been populated from a stored procedure (using enterprise library). This dataset simply has several hundred rows. What I would like to do is, when pressing my "start" button, beging cycling through the records in that dataset (randomly), then when the "pause" button is pressed, pause at the current record and then display it.

Finally, when the "resume" button is pressed, the cycling through records continues, but from the record it paused at.

Is all this possible and feasible?

Thanks.

Jon
 
Yes it is. You could simply create an array containing all of the numbers from 0 to the number of rows, sort it randomly and then loop through the array (on a timer as otherwise it will do it too quickly).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top