[PHP4] ODBC access driver error inserting date
| From: | Olivier Berthou | Date: | Thu, 08 Jun 2000 15:31:43 +0000 |
| Subject: | [PHP4] ODBC access driver error inserting date | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-268@lists.php.net to get a copy of this message | ||
With PHP 4 on NT I try to update an Access 97 database
accessed through ODBC.
I have the error returned by odbc_prepare($cnx, $query) when
the insert query contains a date value :
this query create an error :
$query="INSERT INTO headlines (Date,title) VALUES
('2000-04-05','toto')" ;
while this query one works fine :
$query="INSERT into headlines (title) VALUES ('toto')" ;
The error is :
Warning: SQL error: [Microsoft][ODBC Microsoft Access
Driver] Syntax error in INSERT INTO statement, SQL state
37000 in SQLPrepare in C:\Innetpub\wwwroot\php\headlines.php
on line 36
I have tried also with the ODBC date format escape clause
{d'2000-04-05'} in the query and I have the same error
returned.
Any Idea ??
--
Reuters / Tibco Finance Technology France - Olivier Berthou
8 Rue Du Sentier mailto:berthou@tibcofinance.com
Cedex 02, 75081 Paris, France Tel : 33 - (0)1 42 21 53 80