4 messages in com.mysql.lists.javaRe: JDBC Returning ENUM as ?
FromSent OnAttachments
Monika André-Jönsson23 Feb 2001 05:35 
Nat Pryce23 Feb 2001 06:05 
Charles Sabourdin23 Feb 2001 06:06 
Monika André-Jönsson23 Feb 2001 06:28 
Subject:Re: JDBC Returning ENUM as ?
From:Charles Sabourdin (zouy@yahoo.com)
Date:02/23/2001 06:06:32 AM
List:com.mysql.lists.java

I do getString() form enum fields. You should always retreive something the getString() (or getInt()) parse your data, so you should retreiev your "red". what do you retreive so far?

--- Monika André-Jönsson <moni@factum.se> wrote:

Hello,

I have a problem when I want to retrieve an enum from my MySQL database. I use resultset.getString("Type") were Type is the name of the field where I store the enum value. I.e, I try to get a string value back from the Type field and store it in a java string object. But neither getString or getInt works to retrieve the answer, that should be a string like "red".

Please, can anyone help me???

/Monika