8 messages in com.mysql.lists.javaRe: accessing enum
FromSent OnAttachments
Jon Drukman01 Nov 2006 11:17 
Christopher G. Stach II01 Nov 2006 14:35 
Jon Drukman01 Nov 2006 14:39 
Christopher G. Stach II01 Nov 2006 14:46 
Jeff Mathis01 Nov 2006 15:10 
Jon Drukman02 Nov 2006 16:02 
Mark Matthews02 Nov 2006 17:29 
Christopher G. Stach II02 Nov 2006 17:38 
Subject:Re: accessing enum
From:Jon Drukman (js@cluttered.com)
Date:11/01/2006 02:39:13 PM
List:com.mysql.lists.java

Christopher G. Stach II wrote:

Jon Drukman wrote:

disclaimer: i know nothing about java or jdbc. a co-worker is trying to access a database i've set up using jdbc. he says that my enum column is always returning an integer value instead of the string. obviously this is less than desirable.

What's the column definition? How are you storing it? etc. etc.

CREATE TABLE `file_sha1` ( `id` int(10) unsigned NOT NULL default '0', `type` enum('dl','wm','qt','psp','hd','mp4') NOT NULL default 'dl', `sha1` char(40) NOT NULL default '', `path` char(100) NOT NULL default '', `size` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`,`type`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 |

mysql> select distinct(type) from file_sha1; +------+ | type | +------+ | dl | | wm | | qt | | psp | | hd | +------+ 5 rows in set (0.21 sec)

What else can I tell you?

-jsd-