in reply to cant bind ORA_NUMBER in DBD::Oracle ?

DBD::Oracle doesn't come right out and say so, it does restrict the types you can bind. From the driver code (dbdimp.c),
static int oratype_bind_ok(dbtype) /* It's a type we support for placeholders +*/ int dbtype; { /* basically we support types that can be returned as strings */ switch(dbtype) { case 1: /* VARCHAR2 */ case 5: /* STRING */ case 8: /* LONG */ case 23: /* RAW */ case 24: /* LONG RAW */ case 96: /* CHAR */ case 97: /* CHARZ */ case 106: /* MLSLABEL */ case 102: /* SQLT_CUR OCI 7 cursor variable */ case 112: /* SQLT_CLOB / long */ case 113: /* SQLT_BLOB / long */ case 116: /* SQLT_RSET OCI 8 cursor variable */ return 1; } return 0; }
I'm guessing that NUMBER isn't on this list because Oracle's numbers are in a funky, multiple-byte packed fixed-point format. They won't necessarily fit into any of Perl's native types.

Bind a string instead. It'll be automagically converted.

Replies are listed 'Best First'.
Re: Re: cant bind ORA_NUMBER in DBD::Oracle ?
by premjhere (Initiate) on Jul 18, 2002 at 05:49 UTC
    Thanx a lot DWS . got it .