Hi,
quite sure it's a quoting issue. I made a table:
Code: Select all
CREATE TABLE "t_test" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , "1" INTEGER, "2" VARCHAR)
(This is how SQLiteManager shows the create statement)
and did an insert:
Code: Select all
INSERT INTO `t_test` (`1`, `2`) VALUES (1, 'aText');
(Sent from LC)
This works.
You notice the graves (`) that I use for field and table names?
Using this for field & table names (
whenever there's a possibility the db engine doesn't recognize it itself!), and single quotes for string literals (
= anything but safe numeric values) is a good way to avoid a lot of trouble. Works in mySQL/ MariaDB too.
More about keywords & quoting in SQLite
here.
An advanced text editor with macros, brackets evaluation, visualization for tabs, spaces and line breaks, & good replace functions is invaluable for writing SQL statements - write the statements there, test it in your SQLite Manager, format it & paste the final "put [...] into StrSQL" into the LC script editor. Can save hours of hair pulling ;-)
Have fun!