Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Someone PLEASE explain to me why the code below returns the error:
DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL +Server]Syntax error converting datetime from character string. (SQL-2 +2008)DBD:st_execute/SQLExecute err=-1) $dbh = DBI->connect('Database', '******', '*******', 'ODBC', {RaiseErr +or => 1}) or die "Database connection not made: $DBI::errstr"; $dbhstmt = $dbh->prepare("INSERT INTO ConfigTable ( strID, Modificatio +nDate) VALUES (?, ?)"); die "ERROR: Cannot prepare statement: $DBI::errstr\n" unless (defined +$dbhstmt); $dbhstmt->execute( '$SuStCo_strID', '$date' ); $dbhstmt->finish; $dbhstmt->finish; $dbh->disconnect;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBI, SQL and Dates
by fuzzyping (Chaplain) on Aug 06, 2002 at 23:47 UTC | |
Re: DBI, SQL and Dates
by jsprat (Curate) on Aug 06, 2002 at 23:50 UTC | |
Re: DBI, SQL and Dates
by physgreg (Scribe) on Aug 07, 2002 at 08:29 UTC | |
by dws (Chancellor) on Aug 07, 2002 at 08:36 UTC | |
by aufrank (Pilgrim) on Aug 07, 2002 at 15:27 UTC |
Back to
Seekers of Perl Wisdom