Hi,

I try to read enums from a database through the prepared statement API, as a
number.

The enum is defined e.g., as ENUM('Accept', 'Reject', 'Reject_All')

The bind structure is filled in the following way:

buffer_type = MYSQL_TYPE_LONG
buffer points to an uint32_t
buffer_length = 4
length points to an unsigned long
is_null points to a bool
is_unsigned = true
error points to a my_bool

After calling mysql_stmt_fetch() I receive MYSQL_DATA_TRUNCATED, error is
set to 1, and length is set to 4.

Could somebody explain what am I doing wrong?  Inserts seem to work woth the
same setup properly, only selects have this problem.

Thx.

ImRe

P.S.: version = 5.0.22



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to