Forum > Databases
[CLOSED] Are there any limit to field numbers in TBufDataSet?
egsuh:
Probably around 2048 fields, or so.
Even though I create more fields than that number (via FieldDefs.Add), creating dataset itself does not raise exception. But most columns of the dataset are filled with zeros and the dataset does not operate correctly afterwards.
I found that in the case of SQLite3:
- default SQLITE_MAX_COLUMN is 2000.
- but its max column number is 32767.
Richard Marriott:
In practice this will not be a limitation as the fields are stored in a pointer list, the maximum items being an 32 bit integer (say around 2 billion) DIV 64 (the size of a pointer in a 64bit OS).
Much more likely to be limited by RAM storage space for all the fields and data, or (if using TDBGrid) the useful number of columns for the application.
paweld:
As I wrote you before creating a table with such a large number of columns is a very very bad idea - I don't know why you insist on it.
If you don't like the example I gave in this post: https://forum.lazarus.freepascal.org/index.php/topic,68096.msg525544.html#msg525544
then describe your case, maybe we can come up with something else. But the limit on columns exists in every database engine, and you are unlikely to get around it.
alpine:
I'm also curious what case requires such pushing of db columns number limits.
egsuh:
It's simply a temporary table for exporting data in format for statistical packages.
Please refer to following thread if interested.
https://forum.lazarus.freepascal.org/index.php/topic,68096.0.html
Navigation
[0] Message Index
[#] Next page