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

Sorting a disconnected recordset

Status
Not open for further replies.

roycet

Technical User
Aug 3, 2000
9
US
I am doing this:

(1) obtaining a recorset via an SQL string, with the ORDER BY clause already set
(2) modifying the recordset
(3) displaying the new recordset
Does anyone know of a good way to sort this disconnected recordset between steps (2) and (3)? [sig][/sig]
 
This is an example from MSDN for sorting disconnected recordsets:

Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset

rst.CursorLocation = adUseClient
cnn.Open "DSN=Pubs;Provider=MSDASQL;uid=sa;pwd=;"
rst.Open "SELECT * FROM Authors", cnn, _
adOpenStatic, adLockReadOnly, adCmdText

rst.Sort = "au_lname ASC, au_fname ASC"

rst.Sort = "au_lname DESC, au_fname ASC"

rst.Close
cnn.Close

HTH [sig]<p>Choo Khor<br><a href=mailto:choo.khor@intelebill.com>choo.khor@intelebill.com</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top