Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

mysql enum to java string

 
nitin kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all,

Please can anyone help for the following problem.
I am using mysql as database and want to retrieve values from a table which have enum as one of the columns.
when I get the value in the resultset and try to store it in a string, the value returned by the rs.getString(<column-name> is null.

how should I convert the enum value of mysql to java string ?
mysql docs says that the queries for enum returns string object.

Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. Continue any discussion here.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic