File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Retriving data from table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Retriving data from table" Watch "Retriving data from table" New topic

Retriving data from table

Ian Cockcroft

Joined: Feb 17, 2002
Posts: 29
Hi all, the following code gets data from an ACCESS database.
I need to put the data in textFields and a checkBox, why is so difficult?
OrderDate is a DATE field.
OrderFilled is a Yes/No filled.
How should I be doing it?

I get the following error aswell, when i comment out the setText() code:
Connection error : java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
this really is confusing, i have no idea,
any can help?
mustang india
Ranch Hand

Joined: Feb 05, 2002
Posts: 60
u have to place the cursor at the begining of the result set. All u have to do is put ur data retrivel code inside
//supposing that there is only one row fetched.
if( {
} puts the cursor pointing to the first row fetched by the resultset, if it has fetched something. If there are no rows selected, it returns false.
I agree. Here's the link:
subject: Retriving data from table
It's not a secret anymore!