----- Original Message -----
From: Richard Chen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 17, 2001 9:26 PM
Subject: handling where condition for char(nnn) data types


[...]
         $sth=$dbh->prepare('SELECT * FROM usr WHERE grp = ?) or die $!;
Small tip: it's no use to use $! here. use $dbh->errstr() instead.
[...]
>         use DBD::Oracle qw(:ora_types);
>         $sth->bind_param(1,'foo',{ ora_type => ORA_CHAR });
>
> But I don't really like this work around that much because it
> made my code not portable for such basic data types.

It's not a workaround it makes perfect sense here.
No way to know if interfaces of other databases add padding chars themselves
(or need them).
I use varchars for database fields instead. Solves the issue too.



Reply via email to