in reply to Adding data to an access database

Most probably some of the $RecSet->AddNew(...) failed. Does the method return some kind of success/failure status? And aren't you supposed to call something like $RecSet->Update() or something if you use this insane way of adding data?

Basicaly you'd better forget about ADO, change the script to use DBI and DBD::ODBC and use the normal way of adding data:

use DBI; $db = DBI->connect("dbi:ODBC:$DSN"); $insert = $db->prepare('INSERT INTO Addresses ("Email Address", "Websi +te Title") VALUES (?, ?)') or die "The INSERT statement is wrong: ".$db->errstr()."\n"; while (...) { ... $insert->execute($email, $titlePage) or die "Failed to insert the email $email : ".$db->errstr."\n"; }

Jenda

Replies are listed 'Best First'.
Re: Re: Adding data to an access database
by Raziel (Initiate) on Jan 07, 2003 at 22:42 UTC
    Thanks Jenda, I'll give that a try
      Thank you for your help! I got it to work!