From the Access help file ...
"You must use English (United States) date formats in SQL statements in 
Visual Basic. However, you can use international date formats in the query 
design grid." Have you tried the date as 04032002 or 04/03/2002? (Neither 
make much sense in association with "number".

The ODBC driver may treat dates differently, though. Do you have use of a 
Windows machine with Access on it? Does that insert work? Frequently, when 
I'm doing VB work and a query is giving me difficulty, usually an INSERT or 
UPDATE I've had to play with it a bit in Access's query designer.

Do you have a date/time type for this field in the Access table? Might it 
have to be padded?

This isn't much help, but hopefully it will jar your thinking. <g>


PS Spring is actually arriving here in NS. After a couple of post-equinox 
snow storms, the snow is all gone and I heard real bird song this morning. 
(Something other than chickadees, blue jays, crows and starlings.) And the 
coltsfoot bloomed on the edge of the ditch last Fri. /mt

At 04:23 PM 4/3/2002 +0100, 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)
>  (6, '15381', 20020403, '', '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
>PHP Database Mailing List (
>To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to