I'm trying to bind paramenters on an insert and return a value:
$sth = $dbh->prepare(q{ INSERT INTO TEST VALUES (TEST_SEQ.NEXTVAL,:project_no,:issue) RETURNING fault_no INTO :rv }); $sth->bind_param(':project_no','P999'); $sth->bind_param(':issue','This is the issue.'); $sth->bind_param_inout(':rv',\$rv, 5); $sth->execute(); Of course, when there are alot of columns, the above gets a little untidy... I thought I could use the following: $sth = $dbh->prepare(q{ INSERT INTO TEST (FAULT_NO,PROJECT_NO,ISSUE) VALUES (TEST_SEQ.NEXTVAL,?,?) RETURNING fault_no INTO :rv }); $x = 1; foreach ($project_no,$issue) { $sth->bind_param($x,$_); $x++; } $sth->bind_param_inout(':rv',\$rv, 5); $sth->execute(); When this statement is executed, Oracle complains: "Can't mix placeholder styles (:foo/?) at Oracle.pm line 293." Can the bind_param and bind_param_inout methods be combined?