in reply to Re: DBI and Oracle 8i
in thread DBI and Oracle 8i

Thanks. Here's the code I'm trying..
my $sth = $dbh->prepare("INSERT INTO MY_TABLE(KEY,DATA) values (?,?)") +; my $key = 'key_worked'; my $data = 'data_worked'; $sth->bind_param(1, $key, { TYPE=>DBI::SQL_VARCHAR } ); $sth->bind_param(2, $data, { TYPE=>DBI::SQL_VARCHAR } ); $sth->execute; $sth->finish;
I'm thinking it may be a driver problem, I'm using dbd::oracle::version=1.03.
The error I'm getting is: DBD::Oracle::st execute failed: ORA-01461: can bind a LONG value only for insert into a LONG column
cheers ko

Replies are listed 'Best First'.
Re: Re: Re: DBI and Oracle 8i
by pileswasp (Monk) on Mar 09, 2001 at 22:34 UTC
    Try:
    use DBD::Oracle qw(:ora_types);

    and then you can bind $data with:
    $sth->bind_param( 2, $data, { ora_types => 'ORA_LONG'} )

    which'll almost certainly work.

    Hope you have more fun than I did