In Michaels case he used ora_ph_type=>5 and it seemed as if it trimmed the
space???  Any other experience with STRING type?
Thanks.

Ilya Sterin

-----Original Message-----
From: Michael A. Chase
To: Sterin, Ilya; ''Fox, Michael ' '; [EMAIL PROTECTED]
Sent: 05/01/2001 10:06 AM
Subject: Re: Oracle behaviour when inserting strings containing only blanks

Either 5 or 96 should do the trick.  I tend to prefer to not limit
myself to
not having \0 in a string though I haven't seen a case when it was
useful.

5 was the default behavior in older DBD::Oracles (pre 1.00 I or so); 1
is
the current default.
--
Mac :})
** I normally forward private database questions to the DBI mail lists.
**
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Sterin, Ilya" <[EMAIL PROTECTED]>
To: "'Michael A. Chase '" <[EMAIL PROTECTED]>; "''Fox, Michael ' '"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 8:16 AM
Subject: RE: Oracle behaviour when inserting strings containing only
blanks


> Right, but shouldn't
> ora_ph_type => 5 which Michael used too, should behave same as
> ora_ph_type => 96 and not strip the trailing spaces, at leaset that is
what
> is mentioned in Changes.
>
> 5=> STRING, doesn't strip trailing spaces, embedded \0 ends string
> 96=> CHAR,   doesn't strip trailing spaces, embedded \0 okay
>
> -----Original Message-----
> From: Michael A. Chase
> To: Sterin, Ilya; 'Fox, Michael '; [EMAIL PROTECTED]
> Sent: 05/01/2001 8:38 AM
> Subject: Re: Oracle behaviour when inserting strings containing only
blanks
>
> What's needed is a documentation patch.  Attribute ora_ph_type already
> handles this situation.  If I recall, it can be either an attribute in
> bind_param() or a database handle attribute.
>
> I think what Michael needs would be handled by either of these, but I
> haven't tried them myself:
>
> $dbh->{ora_ph_type} = 96;
> $sth->bind_param( 1, $val, { ora_ph_type => 96 } );
>
> The possible values are listed in DBD-Oracle-1.06/Changes.

Reply via email to