SQL microsoft access syntax error

Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/class/ObjectSQL.inc, line 52

i get this error using the code snippet attached, i must be missing the error in the query...

any help to find it will be much appreciated!
thanks

INSERT INTO FREEPRODUCT
(FREEPRODUCT_ID, AREA_ID, FREEPRODUCT_Title, FREEPRODUCT_Description
, FREEPRODUCT_Sources, FREEPRODUCT_LastUpdated, FREEPRODUCT_GLIDE
, FREEPRODUCT_Folder, FREEPRODUCT_MinX, FREEPRODUCT_MaxY, FREEPRODUCT_MaxX
, FREEPRODUCT_MinY, FREEPRODUCT_Img, CoverImage, Image, FREEPRODUCT_URL1
, mapLink, FREEPRODUCT_Size1, FREEPRODUCT_URL2, mapLink2, FREEPRODUCT_Size2
, SHP_Link, GDB_Link, KML_Link, WMS_Link, PTypeStat, SC_Data, NV_Data, GP_Data
) VALUES(1660, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)

Open in new window

LVL 1
weaverkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
for one, check this field "FREEPRODUCT_LastUpdated", if this a date/time field, it needs a date value like
#1/1/2011# that must be enclosed in "#"

INSERT INTO FREEPRODUCT(FREEPRODUCT_ID, AREA_ID, FREEPRODUCT_Title, FREEPRODUCT_Description, FREEPRODUCT_Sources, FREEPRODUCT_LastUpdated, FREEPRODUCT_GLIDE, FREEPRODUCT_Folder, FREEPRODUCT_MinX, FREEPRODUCT_MaxY, FREEPRODUCT_MaxX, FREEPRODUCT_MinY, FREEPRODUCT_Img, CoverImage, Image, FREEPRODUCT_URL1, mapLink, FREEPRODUCT_Size1, FREEPRODUCT_URL2, mapLink2, FREEPRODUCT_Size2, SHP_Link, GDB_Link, KML_Link, WMS_Link, PTypeStat, SC_Data, NV_Data, GP_Data) VALUES(1660, 1, 1, 1, 1, #1/1/2011#, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)


and for all Text data types fields, the values must be enclosed in single quotes( '1' )
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dale FyeOwner, Developing Solutions LLCCommented:
Well, that isn't really a code segment, it is a SQL statement.

My guess is that some of the fields you are attempting to write to are text fields, and all of the values you are attempting to insert are numeric.

What is the actual code that is responsible for calling this SQL insert statement?
0
mbizupCommented:
Assuming that all of the data is okay fro the field types, try this variation (and try it directly in the query builder before putting it into VBA code):

INSERT INTO FREEPRODUCT(FREEPRODUCT_ID, AREA_ID, FREEPRODUCT_Title, FREEPRODUCT_Description, FREEPRODUCT_Sources, FREEPRODUCT_LastUpdated, FREEPRODUCT_GLIDE, FREEPRODUCT_Folder, FREEPRODUCT_MinX, FREEPRODUCT_MaxY, FREEPRODUCT_MaxX, FREEPRODUCT_MinY, FREEPRODUCT_Img, CoverImage, [Image], FREEPRODUCT_URL1, mapLink, FREEPRODUCT_Size1, FREEPRODUCT_URL2, mapLink2, FREEPRODUCT_Size2, SHP_Link, GDB_Link, KML_Link, WMS_Link, PTypeStat, SC_Data, NV_Data, GP_Data) VALUES(1660, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) 

Open in new window

0
weaverkAuthor Commented:
amazing advice, straight to the problem... it was a date time field, once i gave it the correct input and added the # # as you mentioned, it worked perfectly!
many thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.