Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Beginner needs help in ResultSet and ResultSetMetaData Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Beginner needs help in ResultSet and ResultSetMetaData" Watch "Beginner needs help in ResultSet and ResultSetMetaData" New topic
Author

Beginner needs help in ResultSet and ResultSetMetaData

Nancy Lee
Greenhorn

Joined: Mar 23, 2002
Posts: 15
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.
 
I agree. Here's the link: jrebel
 
subject: Beginner needs help in ResultSet and ResultSetMetaData
 
Similar Threads
Oracle describe table from jdbc
mysql enum to java string
Adv JSP (Geary) DB examples & MySQL
How to view the Datatypes of the Columns of a Table in SQLSERVER
Return a ResultSet from a model class?