Re: cast boolean & dbd::informix
Posted in 2000
On 27 Jun 2000 22:46:10 GMT, Thomas Enzeley Conlin Wrote: > > I have written a perl script using dbd::informix > I am performing a simple select from a table that contains a col of type boolean. > > the perl dbd module complains > > DBD::Informix::db prepare failed: SQL: -486: > Illegal data type found during data conversions. at dt_test.pl line 20. > > my guess is that perl wants it's booleans to be 0|1 instead of 'f'|'t' > Both 'F' and 'T' are true as far as Perl is concerned - undefined value,0, '0' (the string) and '' (the empty string) are 'false' and everything else is true ... Perl itself doesnt have a boolean type so you will need to check in code for 'F' and 'T' ... I dont have a database that supports BOOLEAN so I cant help you with an example right now. /J\\