> > 
> > $dbh->prepare( "INSERT INTO tbl_people ( lastname ) VALUES (?)" );
> 
> This should be
> 
>   $sth = $dbh->prepare( "INSERT INTO tbl_people ( lastname ) 
> VALUES (?)" );

ok. What is the function of the '?' for values ?  
can I subsistute a variable (VALUES ($name)"?

> 
> > 
> > How do I have it iterate through an array of names ?
> > 
> > foreach $name (qw( Smith Jones Roberts Johsnon Fredericks) ) {
> >     sth->execute($name);
> 
> And this should be
> 
>         $sth->execute($name);

woops! :-)

> 
> Also, I see that you're not error checking your dbi statements -
> hopefully you have RaiseError set to 1(on).  Read the perldocs
> on DBI - Error checking is explained in detail there - do
> 
>   perldoc DBI
> 
> to see.  Search for RaiseError.

Yes, I plan to do that. I just want to get some of the table manipulation
techniqes down first. But I do have RaiseError set:
### The database handle
my $dbh = DBI->connect( dbi:Oracle:prj_test.ftbee01a","xx","xx",  {
    RaiseError => 1
});


> 
> HTH.

Yes, very much. Thank You.

Jim Kipp


 

Reply via email to