Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JDBC select all rows in order

Posted on 2002-07-12
1
Medium Priority
?
184 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 200 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…
Suggested Courses

885 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