Page 1 of 1

Add a field to an existing table?

Posted: Mon 12 Oct 2020 02:40
by nszmnsky
Is it possible to use LiteTable component to add a field - like is seen in the demo for VirtualTable?

Re: Add a field to an existing table?

Posted: Tue 13 Oct 2020 15:34
by MaximG
Do you need to add a new TField class to the dataset or a new field to the SQLite table?

Re: Add a field to an existing table?

Posted: Tue 13 Oct 2020 16:24
by nszmnsky
I need to add the field to the SQLite table. I know how to do it via "ALTER TABLE", so can go that route if can't be done by calling a procedure in the TLiteTable component.

Re: Add a field to an existing table?

Posted: Fri 16 Oct 2020 09:52
by MaximG
TLiteTable is a descendant of the standard class TDataSet, which provides access to data and is not intended to modify database schema. To add a new column to an existing table, use the statement ALTER TABLE ADD COLUMN

Re: Add a field to an existing table?

Posted: Sun 01 Nov 2020 15:07
by nszmnsky
Thanks Maxim! That is the route I had taken. Think I understand why TVirtualtable has .AddField but TLiteTable does not.

Re: Add a field to an existing table?

Posted: Mon 02 Nov 2020 16:18
by MaximG
Please don't hesitate to contact us with questions concerning our product usage.