• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Retriving data from table

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
Regards
Ian


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?
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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(rs.next()) {
}
rs.next() 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic