TYPE => DBI::SQL_CHAR vs. ORA_CHAR

From: Paul Boutros (Paul.Boutros_at_utoronto.ca)
Date: 06/19/04

  • Next message: Tim Bunce: "DBI::ProxyServer in multi-threaded mode"
    To: "dbi-users" <dbi-users@perl.org>
    Date: Fri, 18 Jun 2004 23:01:47 -0400
    
    

    Hello,

    I've run into the problem described in the DBD::Oracle FAQ
    about Oracle trimming my trailing whitespace. The suggested
    solution is:

    use DBD::Oracle qw( :ora_types );
    $sth->bind_param(1, ' ', { ora_type => ORA_CHAR } );

    But it notes parenthetically that you can also use:
    $sth->bind_param(1, ' ', { TYPE => DBI::SQL_CHAR } );

    At first I thought the latter was preferred for portability,
    but on second thought the hash-key is called "ora_type",
    so I would think that other RDBMSs would simply ignore
    this directive.

    So, aside from the former requiring the explicity use DBD::Oracle,
    is there any reason to prefer one over the other?

    Paul


  • Next message: Tim Bunce: "DBI::ProxyServer in multi-threaded mode"

    Relevant Pages