How to bind an enum field in the c connector for a prepared statement ?

For a select statement (so in binding the result set) using a fixed sized char buffer and specifying the field type as MYSQL_TYPE_STRING works. But for an insert statement (so in binding the parameters) this does not work. I tried using MYSQL_TYPE_ENUM with several buffer types(short, int, long) but so far I only get: Prepared statement error: 2036, state: HY000, Buffer type is not supported The client library version is: 10.4.3 Is there an example how to bind an enum field for both input and output in a prepared statement ?

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.