in reply to Re: DBI SQL error messages
in thread DBI SQL error messages

Here's my query:

$sth = $dbh->prepare("INSERT INTO tblCustomer (BranchID, LastName, Fir +stName, Street, Town, County, PostCode, PhoneNumber, Email, FAX, Note +) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); "); $sth->execute( 'L1', $secondname, $firstname, $order->{addresses}->{delivery}->{street}, $order->{addresses}->{delivery}->{city}, $order->{addresses}->{delivery}->{county}, $order->{addresses}->{delivery}->{postcode}, undef, 'rjberry@gmail.com', undef, 'Order ID #' . $id ) or die "Could not update DB!";

(simplistic code, I know. I'm just writing a small program to transfer orders from the website to the EPOS system at the place I work ... )

Replies are listed 'Best First'.
Re^3: DBI SQL error messages
by Corion (Patriarch) on Oct 06, 2008 at 10:34 UTC

    I don't have MS Access to test this right now, but it could be that Access doesn't like the trailing semicolon at the end of your query.