aspose file tools*
The moose likes Servlets and the fly likes mysql enum to java string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

mysql enum to java string

nitin kumar
Greenhorn

Joined: Feb 11, 2004
Posts: 6
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

Joined: Jan 10, 2002
Posts: 60041
    
  65

Please do not cross-post the same question in multiple forums. Continue any discussion here.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mysql enum to java string
 
Similar Threads
sharing enum contants
Switch error: incompatible type found
what is the problem with my java code
Enum in java 1.4
mysql enum to java string