You may find you have to wrap the date in single quotes. This may vary from DB to DB,
but some are picky about excepting anything
but normal numbers unquoted.
-Stephen
-----Original Message-----
From: Jeff Thies [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 04:02 PM
To: [EMAIL PROTECTED]
Subject: sql error
I'm drawing a blank on an error I'm getting inserting a "date"
(2001070112:00:00) into a varchar field.
Cannot execute: You have an error in your SQL syntax near ':00:00)' at
line 1
my $sql=q{INSERT INTO some_table(the_date) values(?)};
my $sth=$dbh->prepare($sql);
$sth->execute($the_date) || die "Cannot execute: $DBI::errstr\n";
What could be wrong?
Jeff