in reply to Re: Re: Re: Updating Specific Fields in MS Access
in thread Updating Specific Fields in MS Access
Spits back:#! C:\perl\bin\perl.exe -w use DBI; #use strict; my $DSN='Database'; my $driver; my $servlist; my $field='Server'; #connect to database my $dbh=DBI->connect("dbi:ODBC:$DSN", "admin", "") || die; #Open file for reading open(INPUT,"file.txt") || die; while (<INPUT>) { chomp; my ($servlist, $driver)=split(/,/); my $sqlstatement=("UPDATE Servers SET nic1_driver_version='$driver +' WHERE '$field' = '$servlist\n'"); my $sth=$dbh->prepare($sqlstatement); $sth->execute || die; } close (INPUT); $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Updating Specific Fields in MS Access
by pfaut (Priest) on Apr 18, 2003 at 00:24 UTC | |
by p0lp0t (Initiate) on Apr 18, 2003 at 00:38 UTC |