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

Random sorting in a recordset

Status
Not open for further replies.

logge

Programmer
Jun 16, 2000
6
NL
Hi!

Does anyone know how to randomly sort records in a CRecordSet class? (Connected to an Access database)
I heard that the following should work:

m_pSet->m_strSort = "RND()";
m_pSet->Requery();

But all I get is an error that says RND is undefined.

Is there another way?

Thanks!

Peter Logarn
 
well... I dont know how it could be done with a recordset but you could always just put the data into an array of structs suiting your data and do random swaps.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top