• 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

Beginner needs help in ResultSet and ResultSetMetaData

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Windows XP, j2sdk1.4.1, MySQL version 3.23.49.
I have downloaded some book's examples to try. The example create and update table correctly to database in MySQL. But there are some problems in retrieving data. Some functions of ResultSet and ResultSetMetaData work correct some do not.
For examples:
1. getColumnCount() and isNullable() return correct answers.
2. getColumnName() returns correct String length but the content is all replaced by spaces.
3. getString() only returns some garbage.
From MySQL, it shows that all the data (including column names)are correct in the table. How come the table can be created and updated correctly but can not be retrieved correctly?
Thanks for any help.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic