Ok - I guess you're right. Here's the output from DBI->trace(3):
dbd_bind_ph(): bind :p1 <== '7553' (type 0 (DEFAULT (varchar)))
dbd_rebind_ph_char() (1): bind :p1 <== '7553' (size 4/8/0, ptype
4(VARCHAR), otype 1 )
dbd_rebind_ph_char() (2): bind :p1 <== ''755' (size 4/8, otype
1(VARCHAR), indp 0,
On 08/05/09 15:26, E R wrote:
On Fri, May 8, 2009 at 5:40 AM, Charles Jardine wrote:
You do not say which perl driver your are using to talk to Oracle.
The DBD::Oracle driver binds all placeholders as strings by default.
Are you using DBD::Oracle?
Yes, I am using DBD::Oracle.
What other per
On Fri, May 8, 2009 at 5:40 AM, Charles Jardine wrote:
>
> You do not say which perl driver your are using to talk to Oracle.
> The DBD::Oracle driver binds all placeholders as strings by default.
>
> Are you using DBD::Oracle?
Yes, I am using DBD::Oracle.
What other perl drivers are there for O
On 07/05/09 16:23, E R wrote:
Hi,
I have a situation where I need a number to be represented as a string
in a place holder:
my $x = 7553;
$dbh->do("SELECT * FROM PRODUCTS WHERE VENDOR = ?", {}, $x);
I'd like the above to be the same as: SELECT * FROM PRODUCTS WHERE
VENDOR = '7553'
The VENDOR
Yes I think you can
Give this a try
ORA_STRING, ORA_LONG, ORA_RAW, ORA_LONGRAW,
use DBD::Oracle qw(:ora_types);
.. connect as normal
$sth=$dbh->prepare("SELECT * FROM PRODUCTS WHERE VENDOR = :p_vendor");
$sth->bind_param(":p_vendor",'7553', { ora_type =>ORA_CHAR });
if ORA_CHAR dose not
Hi,
I have a situation where I need a number to be represented as a string
in a place holder:
my $x = 7553;
$dbh->do("SELECT * FROM PRODUCTS WHERE VENDOR = ?", {}, $x);
I'd like the above to be the same as: SELECT * FROM PRODUCTS WHERE
VENDOR = '7553'
The VENDOR column is a VARCHAR2, and Oracle