Forum > LCL

TDBGrid Issues Depending On SQLite Database Type

<< < (3/3)


--- Quote from: wp on September 14, 2022, 11:26:31 am ---When your concern is the column width in the DBGrid, you could use DBGrid.Columns[colum_index].Width := some_pixel_value, or SQLQuery1.Fields[field_index].DisplayWidth := some_character_count.

--- End quote ---
And that's why i said to store those "metadata" in a separate table (aka INFORMATION_SCHEMA)


--- Quote from: Zvoni on September 14, 2022, 12:31:15 pm ---I still don't understand why you need to set the Fieldsizes, considering SQLite ignores any sizerestrictions on Table-Columns

--- End quote ---

I'm fully aware that SQLite ignores the size restrictions in table columns.  But if you look at what I said yesterday, they are being created incorrectly if I don't manually create them:

(2) The field sizes are wrong.  Here are examples:
- VarChar(2000) is correct at 2000
- Text(2000) is 0 - treated as memo
- Text is 0 - treated as memo
- WideChar is incorrect at 255

I'm going to try rvk's suggestion later today.

Then go the other way round.
As far as i understood it, the StringFields are actually created automatically based on the underlying Query.
Execute the Query, so that it creates everything, and THEN SET Fieldsize and whatever else (like wp told you)


[0] Message Index

[*] Previous page

Go to full version