• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Beginner needs help in ResultSet and ResultSetMetaData

 
Nancy Lee
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic