vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Phillip Atkinson wrote: > Using Informix 9.40, is it possible to insert data into a text field? > I'm trying the following, but with no sucess... > > insert into tablename (field1) values ('abc' || '123'); > > field1 is a text datatype. For ancient historical reasons, there are no TEXT or BYTE literals in the Informix dialect of SQL. Consequently, you cannot do what you hope - at least, not that directly. The usual workaround is to use a placeholder and provide a loc_t structure with the actual data (strictly, that's ESQL/C, but I assume ODBC etc have similar mechanisms). The alternative is to write a cast from CHAR to TEXT, install it and use it -- since you have 9.40 (thanks for including that info), it is an option. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/ |