in reply to Re: Re: Re: Re: Updating Specific Fields in MS Access
in thread Updating Specific Fields in MS Access
In order to use placeholders, put a '?' whereever you will need to plug data into the statement. Your UPDATE statement then becomes:
my $sth = $dbh->prepare("UPDATE Servers SET nic1_driver_version=? WHER +E Server=?");
Then, pass the values to plug into those placeholders to execute like so:
$sth->execute($driver,$servlist);
The statement doesn't need to change from one execution of the loop to the next. Therefore, the prepare can be done outside the loop. The values change each iteration and get plugged into the statement at execute time inside the loop.
90% of every Perl application is already written. ⇒ |
dragonchild |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Re: Updating Specific Fields in MS Access
by p0lp0t (Initiate) on Apr 18, 2003 at 00:38 UTC |
In Section
Seekers of Perl Wisdom