On 7/13/05, Dean Arnold <[EMAIL PROTECTED]> wrote: > > Jonathan Leffler wrote: > [...] > > The BYTEA example - corresponding to BYTE in IDS - is trickier. The > string > > you supply is converted into the relevant C structure - it happens to be > a > > loc_t in Informix ESQL/C - and then passed to the database. For INSERT, > this > > is easy because the types are described and the code in DBD::Informix > can > > tell that it needs to treat that properly. In other places, you have to > use > > the Informix type codes to convey the information to DBD::Informix. From > > 'perldoc DBD::Informix': > > > > > > $upd = 'UPDATE SomeTable SET TextCol = ? WHERE Pkey = ?'; > > $sth = $dbh->prepare($upd); > > $sth->bind_param(1, $blob_val, { ix_type => IX_TEXT }); > > $sth->bind_param(2, $pkey); > > $sth->execute; > > > > Internally, DBD::Informix knows that it must do the Perl string to > Informix > > loc_t mapping when this is specified. > > > > Yes, it is a bit of work for the driver - but, for at least some > drivers, it > > is doable. > > > > Have you considered updating DBD::Informix to use the SQL_BLOB/CLOB type > codes ?
It recognizes those too - AFAICR. I just prefer to use Informix type names for Informix types. And there are also BLOB and CLOB type LOBs in Informix - which are distinctly different from the BYTE and TEXT LOBs, and even less supported by DBD::Informix. -- Jonathan Leffler <[EMAIL PROTECTED]> #include <disclaimer.h> Guardian of DBD::Informix - v2005.01 - http://dbi.perl.org "I don't suffer from insanity - I enjoy every minute of it."