Topic: I am having trouble adding a column to a table
I have just converted to using the SQLitePass package, which is very nice, but I am having trouble adding a column to a table, using the syntax:
SQLStr := Format ('BEGIN TRANSACTION; ALTER TABLE %s ADD COLUMN %s %s; COMMIT;',
[LocalDef.Name, RefDef.Name, FieldTypeStr]);
if (NOT (FieldCreated)) then begin
TempQuery.SQL.Text := SQLStr;
TempQuery.Open;
TempQuery.ApplyChanges;
TempQuery.Close;
This produces a line such as "... ALTER TABLE PROGRESSION ADD COLUMN Value; ..." which appears to execute without a problem, but when checking the database using another program (I am using the SQLite Manager addon for FireFox/Komodo Edit on Linux) I cannot find the new column in the database.
Not sure what I am doing wrong; is there something I need to do to write out the changes to the database file?
Thanks for the help.