in reply to Re: DBI error Can't mix placeholder styles (:foo/?)
in thread DBI error Can't mix placeholder styles (:foo/?)

I get a different error after that change:
DBD::Oracle::st execute failed: called with 3 bind variables when 4 ar +e needed
my $insql = " INSERT INTO PROGTBL (cola, colb, colc ) VALUES ( ?, ?, ?) RETURNING PROGID INTO ? "; my $sth = $self->dbh->prepare($insql) or die "Can't prepair statem +ent: $self->DBI::errstr"; $sth->bind_param_inout(4, \my $new_id, 99); $sth->execute( $foo, $bar, $baz)

Replies are listed 'Best First'.
Re^3: DBI error Can't mix placeholder styles (:foo/?)
by mje (Curate) on Jun 21, 2011 at 09:44 UTC

    Yes, sorry. You need to bind the input parameters by calling bind_param().

      Thank you. Must I bind each indicidually, e.g.
      $sth->bind_param(1, $foo); $sth->bind_param(2, $bar); ....

        If you are mixing input and output parameters I believe so.