By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 820 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

ADO Recordset sorting problem

P: 2
Hi

I am new to V.B . currently i am using MS-Access as backend and V.B 6.0 as front end. now i am creating one table in MS-Access with fields SName and SAge and i entered 15 records with out any order.
now i am trying to access those records using ADO recordset.its working fine.. but it shows last 14 records in first position and first record in the last position. so what i have to do to access all the records in the same order as i entered in Access.

Thanks in Advance...

Regards
Nash.B
Sep 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: 88
Hi

I am new to V.B . currently i am using MS-Access as backend and V.B 6.0 as front end. now i am creating one table in MS-Access with fields SName and SAge and i entered 15 records with out any order.
now i am trying to access those records using ADO recordset.its working fine.. but it shows last 14 records in first position and first record in the last position. so what i have to do to access all the records in the same order as i entered in Access.

Thanks in Advance...

Regards
Nash.B
it's pretty hard to know exactly what you should do without knowing what sql statement you used to access the data, but i would suggest adding " ORDER BY Id ASC" at the end of it to order it by the database id. this requires, of course, that you have a column in your database called "Id" with data type "AutoNumber" and set as Primary Key.
Sep 17 '07 #2

P: 2
Thanks .... now i am using the Autonumber field and its working...

Regards
Nash
Sep 17 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.