I wonder if it would be possible (and useful) for DBD::Oracle to warn if
there are unbound params.

Tim.

On Mon, Jun 04, 2012 at 02:12:53PM -0400, Jeffrey Seger wrote:
> $dbh->do() executes your sql.  You are binding the parameter after this.
>  Use $dbh->prepare instead.
> 
> On Mon, Jun 4, 2012 at 2:01 PM, Bruce Johnson
> <john...@pharmacy.arizona.edu>wrote:
> 
> > I'm getting the following error:
> >
> > [Mon Jun 04 09:14:49 2012] [error] [client 128.196.45.237]
> > DBD::Oracle::db do failed: ORA-01008: not all variables bound (DBD ERROR:
> > OCIStmtExecute) [for Statement "insert into resources (
> > short_name,long_name,building_id,room_desc,isaroom,numseats,numtables,hour_open,hour_close,available,computer,enet_num,approved_text)values(
> > 'B340','SP Training Room','1062','','1','','','7','20','A','','','')
> > returning resource_id into :new_id"] at /home/allwebfiles/perl/
> > resource_mgmt2.pl line 67., referer:
> > https://resource-scheduler.pharmacy.arizona.edu/calendar/resource_mgmt.pl
> >
> >
> > The relevant perl code is:
> >
> > my $new_resource_id = 0;
> > my $csr_insert = $lda->do($sq_insert);
> > $csr_insert->bind_param_inout(':new_id', \$new_resource_id, 25);
> > $csr_insert->execute();
> >
> > There's only one variable, and as far as I can see it's correct.
> >
> > $sq_insert is the statement listed in the logged error. resource_id is
> > created via an 'on insert' trigger.
> >
> >
> > --
> > Bruce Johnson
> > University of Arizona
> > College of Pharmacy
> > Information Technology Group
> >
> > Institutions do not have opinions, merely customs
> >
> >
> >
> 
> 
> -- 
> "Champions do not become champions when they win the event, but in the
> hours, weeks, months and years they spend preparing for it. The victorious
> performance itself is merely the demonstration of their championship
> character." -T. Alan Armstrong
> 
> "The Ow that can be expressed is not the true Ow." - Ao Tzu

Reply via email to