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!

Reg storage and reterival of records

Status
Not open for further replies.

vidyut

Technical User
Jan 12, 2001
1
IN
hai,

if store n number of records from a visual basic grid to oracle vai a ADODB recordset, while the next time i reterive the data the records get sorted alphabetically i want the records to get reterived in the same order as i stored. please help in this regards

thanks and regards
karthee
 
The only way to guarantee that records will be retrieved in a specific order is to use a where clause in your select. Depending on how the data was ordered at the time of insert it may, or may not, be possible to create a where clause that recreates the original order.

If you can't easily reconstruct the insert order you will probably have to add a sequence number column to your table. The sequence number can be assigned at the time of insert and used for sorting the data in the select.
 
Sorry for my mental lapse. Of course I meant "order by clause" instead of "where clause in the above post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top