Question:
I have a field called DATE and when I do a Query on the
table with the SQL Statement SELECT DATE FROM "tablename.db"
I get an error "Invalid use of Keyword. Token: DATA line 1"
What is the problem?
Answer:
Never name a Field "Date". Date is a Keyword in SQL and therefore
SQL statements that use the word in the wrong way will throw
this error.
Subscribe to:
Post Comments (Atom)






Never use a SQL reserved word in oyur sentences. But to solve this you can use an alias: SELECT DATE THE_DATE FROM "tablename.db"