RE: Clob insert problem on a Oracle db with DBI
- From: Philip.Garrett@xxxxxxxxxxx (Philip Garrett)
- Date: Tue, 30 Jan 2007 15:22:06 -0500
Ron S Cetnar wrote:
I have a problem inserting a line of text into a CLOB data field in
Oracle. The version of PERL is 5.8 running on a AIX server 5.2. It
looks like when I'm doing the insert, it is looking at the text to
execute. The text is a sql statement that I'm trying to load.
Any help would be greatly appreciated.
Thanks.
Ron
Below is my insert statement and the error ORACLE error that I'm
getting.
PERL statement to do the insert:
$sqlexec = qq{INSERT INTO ua_ps_sql_text_tble (sql_id,
sql_type, market, sql_text)
values ('$prog', '$ext', '$space_out',
'$sql_line')};
$sth=$dbh->prepare($sqlexec);
$sth->execute;
Use bind parameters instead, to avoid quoting problems:
$sqlexec = qq{INSERT INTO ua_ps_sql_text_tble
(sql_id,sql_type,market,sql_text
VALUES
(?,?,?,?)};
$dbh->do($sqlexec, undef, $prog, $ext, $space_out, $sql_line);
Regards,
Philip
.
- References:
- Clob insert problem on a Oracle db with DBI
- From: Ron S Cetnar
- Clob insert problem on a Oracle db with DBI
- Prev by Date: Clob insert problem on a Oracle db with DBI
- Next by Date: RE: Clob insert problem on a Oracle db with DBI
- Previous by thread: Clob insert problem on a Oracle db with DBI
- Next by thread: RE: Clob insert problem on a Oracle db with DBI
- Index(es):
Relevant Pages
|
|