Solved

JDBC select all rows in order

Posted on 2002-07-12
1
158 Views
Last Modified: 2012-05-04
Hi All,
 I would like to collect all the rows of a small MS Access database in the order that they are listed in the database. I am using JDBC in JSP pages.

My SQL statement is simple:
"SELECT * from NavTable"

Unfortunately, the recordset does not return the rows in the same order.  

Everything is re-arranged.

What can I do?
TIA DoughBoy
0
Comment
Question by:DoughBoy
1 Comment
 
LVL 28

Accepted Solution

by:
TextReport earned 50 total points
ID: 7151050
You need to tell your SELECT statement the specific order you wish it to return in, eg SELECT * FROM navtable ORDER BY field1, field2 ...

If you are not able to sort by fields and you you want data entry order then there is no way you can get this as the table stands. You can create an AutoNumber field and this will work with new tables.

Cheers, Andrew
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question