It looks fairly straightforward. Column "REPLY" is not a type LONG column.
There might also be some confusion with parameters 1 and 4. You are passing
reply_id.nextval and sysdate. Neither has any meaning at the Perl level,
they should be part of the SQL statement. Placeholders pass _values_, not
statement elements.
Because the errors in parameters 1 and 4 were not caught, I suspect you are
not using '-w' in the '#!' line and are not using 'use strict;'. Both will
help catch errors before they cause hard to track down problems.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
----- Original Message -----
From: "Morrison Davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 15:28
Subject: What am I missing? with this bind stuff
> Here is my table.
> REPLY_ID NOT NULL NUMBER(15)
> REPLY VARCHAR2(4000)
> REPLY_AUTHOR VARCHAR2(10)
> REPLY_DATE DATE
> THREAD_ID NOT NULL NUMBER(15)
> TOOL_ID NOT NULL NUMBER(15)
> ICON_ID NUMBER(15)
> CATEGORY_ID NOT NULL NUMBER(15)
>
> Here is my code:
> $stmt = $dbh->prepare("Insert into REPLIES values(?, ?, ?,
?, ?,
> ?, ?, ?)");
> $stmt->bind_param(1,reply_id.nextval,{TYPE =>
SQL_NUMBER});
> $stmt->bind_param(2,$REPLY,{TYPE => SQL_LONGVARCHAR});
> $stmt->bind_param(3,$myform{employee_id},{TYPE =>
SQL_VARCHAR});
> $stmt->bind_param(4,sysdate,{TYPE => SQL_DATE});
> $stmt->bind_param(5,$myform{threadid},{TYPE =>
SQL_NUMBER});
> $stmt->bind_param(6,$myform{toolid},{TYPE => SQL_NUMBER});
> $stmt->bind_param(7,$myform{iconid},{TYPE => SQL_NUMBER});
> $stmt->bind_param(8,$myform{category_id},{TYPE =>
SQL_NUMBER});
> $stmt->execute() or die $DBI::errstr;
> Here is the error:
> ORA-01461: can bind a LONG value only for insert into a LONG column (DBD
ERROR:
> OCIStmtExecute)
>
>