Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl (Win32:ODBC) to update records

Status
Not open for further replies.

Shrp

IS-IT--Management
Jan 9, 2002
82
US
I'm trying to use Win32:ODBC to update a series of records
in an Access database. I'm able to use FetchRow to get the
records I want. However, when I try to update those
records, then it only grabs the first of those records
and never fetches any more.

I've been doing variations of something like:

while ($db->FetchRow()) {
$db->Sql("update database set $field1 = value1 where id = $id);
$db->Sql("update database set $field2 = value2 where id = $id);
}

It will update the first record just fine, but doesn't find any others, whereas if I leave out the sql statements,
it finds the ones I want.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top