This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Get index of a row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Get index of a row" Watch "Get index of a row" New topic

Get index of a row

dushantha Rathnayake
Ranch Hand

Joined: Feb 27, 2010
Posts: 103

My client has a MS Access database. Using this database I have to build a application. But I want to use Mysql database. So I have to get data from MS Access database. The problem is, In this MS Access tables there are no any Primary Keys. So I can't capture data correctly. But I have an idea about table row number. If I can get the index numbers of that rows I can capture them correctly. If anyone know about how to get the table row index number please tell me.

Thank you.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32328

Row numbers are a horrible way of tracking things - they can change when you reorganize your database. To change databases, you can do an export of the table to CSV.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
It is sorta covered in the JavaRanch Style Guide.
subject: Get index of a row
jQuery in Action, 3rd edition