473,327 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

ADO Recordset sorting problem

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
2 2300
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
Thanks .... now i am using the Autonumber field and its working...

Regards
Nash
Sep 17 '07 #3

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

Similar topics

23
by: Rob Meade | last post by:
Lo all, Ok - this is what I was aiming to do, and then I thought - naahhh, that cant be right! query database results to recordset results to array using GetRows update values in one column...
7
by: Federico G. Babelis | last post by:
Hi All: I have this line of code, but the syntax check in VB.NET 2003 and also in VB.NET 2005 Beta 2 shows as unknown: Dim local4 As Byte Fixed(local4 = AddressOf dest(offset)) ...
22
by: Gerry Abbott | last post by:
Hi all, I having some confusing effects with recordsets in a recent project. I created several recordsets, each set with the same number of records, and related with an index value. I create...
3
by: alex_peri | last post by:
Hello All, I am having problems with sorting a recordset by fields in Access. I have a table with three columns called ID, SNo and Time and would like to sort the records by Time. I would like to...
3
by: MLH | last post by:
In the code snippet below, MyMovies is a table of movie names. First field is a unique long integer ID. Second field is text string containing movie name. The second field's Indexed Property...
2
by: kw_uh97 | last post by:
Hello everone, I am a newbie and I have a recordset that returns the values XXXXMain XXXX1 XXXX2 XXXX3 XXXX4 XXXX5 XXXX6 YYYY1
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
10
by: shubha.sunkada | last post by:
Hi, I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due...
0
by: Yarik | last post by:
Hello, Here is a sample (and very simple) code that binds an Access 2003 form to a fabricated ADO recordset: ' Create recordset... Dim rs As ADODB.Recordset: Set rs = New ADODB.Recordset '...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.