2

Yeah,this is reall weired, we are using microsoft access 2010 for java ... then here is my printout sql statement

DB Query:

INSERT INTO FileShare(source,destination,date)
VALUES ('C:\Users\JunHai\Documents\Scenario.docx',
          'C:\Users\JunHai\Desktop\dfdfd.docx','29/01/2011 00:34:33')

It totally seems alright, but it just keeping giving me syntax error ... who can really see the problem ?

4
  • Whats the syntax error? And post the Java Code who call it. Commented Jan 28, 2011 at 16:51
  • 12
    Date's a reserved name, you'll have to surround it with backticks Commented Jan 28, 2011 at 16:51
  • 1
    Post it as an answer @marc-b, the questoin deserves one, but it feels wrong to post you answer :) Commented Jan 28, 2011 at 16:57
  • 4
    Microsoft Access 2010 for Java: just radiates efficiency. Commented Jan 28, 2011 at 16:59

1 Answer 1

4

Date's a reserved name, you'll have to surround it with backticks (`)

Sign up to request clarification or add additional context in comments.

1 Comment

If this is being inserted into an Access database using JDBC, why to you use back ticks and not square brackets - [Date] - which would be standard for MS Access?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.