Re: Inserting into Access
| From: | Steve | Date: | Thu, 04 Apr 2002 04:05:45 +0000 |
| Subject: | Re: Inserting into Access | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18182@lists.php.net to get a copy of this message | ||
Try adding single quotes to the user and date fields
George Pitcher wrote:
>
> Hi all,
>
> I'm having a problem inserting some php stuff into an Access table.
>
> This is what is being sent to Access:
>
> INSERT INTO ActivityLog (User, Docid, Date, ClientIP, Time, CourseRef)
> VALUES
> (6, '15381', 20020403, '146.176.13.99', '15:08',
> 'Counselling')
>
> The error is:
>
> SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT
> INTO statement., SQL state 37000
>
> In explanation, User and Date are Number fields and the rest are text
> fields.
>
> I am using a similar syntax INSERT INTO another table in the same database
> without a problem. Possibly a cursor problem (I remember some, but not
> enough, stuff from my brief flirtation with ASP).
>
> Any clues?????
>
> George in Edinburgh