Re: MS ACCESS
| From: | David Robley | Date: | Tue, 05 Sep 2000 06:36:41 +0000 |
| Subject: | Re: MS ACCESS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15241@lists.php.net to get a copy of this message | ||
On 5 Sep, TOM wrote:
> Warning: SQL error: [Microsoft][ODBC Microsoft Access 97 Driver] Syntax
> error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in
> D:\InetPub\wwwroot\php\DataAccess.php on line 80
>
> Anybody know what's wrong with the code?
> $SQL_Exec_String = "Insert Into People (id, number) Values (1, '123')";
> $cur = odbc_exec( $cnx, $SQL_Exec_String );
>
If number is a numeric field, Access may get annoyed if you attempt to
feed it a string value, ie enclosed in quotes. Does that query work in
Access proper?
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA