[Lazarus] SQLite & DB Aware Components
mailinglists at collins-email.co.uk
Fri Dec 2 17:18:49 CET 2016
On 02/12/16 06:13, LacaK via Lazarus wrote:
>> Casting it as a different type in the SQL statement worked!
> You are not required to that if you have declared table "mytable" as:
> CREATE TABLE "mytable" (
> FileName varchar(100),
> Date datetime
Thank you Laco. Just tried that out and it works. The database I am
using was created using a couple of visual database managers - exported
from MS Access to an Excel file and then saved as CSV before the 4200
rows x 51 columns of the main data were imported into a prepared sqlite
table. I used the visual managers as I am not experienced in creating
tables & fields by SQL or importing large amounts of data.
The weird thing is that when creating my fields the visual database
managers did not have the option of VARCHAR only TEXT (plus INTEGER,
BLOB, REAL & NUMERIC), but I just found I can create a VARCHAR field by
executing your SQL statement above! Further reading on sqlite seems to
suggest that VARCHAR isn't really stored that way as SQLite just treats
it as unlimited TEXT?
It's all a bit confusing and probably getting a bit off-topic for
lazarus/freepascal, but I am getting there. Thanks for you help.
More information about the Lazarus