There is a structure looking like this:
DBEdit
Datafield = EMISSIONSPREIS
DataSource = DataSource_EinAsset
IBQuery = IBQuery_EinAsset
Not sure, if it is important: There are a lot of data sensitive fields in this query / Frame.
To this very value I suddenly found an "invalid figure" in my database.
And sometimes I read there
"Dataset buffer is too small (4) to receive the data from Field ...."
What does this mean!?
Although it is years ago, that I migrated from Delphi, (what I am grateful for!), I miss something:
There exists an editor for datafields. In this very editor I could check the type of the input, which was e.g. integer or float or "computed". This I would like to control. I do not see such options in FP. Are they not there or is it me who cannot find them?
My question:
Please hint me, how to key in my value in DBEdit without buffer error.
Thanks.
IBX stores the data for each row in a row buffer. This is a contiguous area of memory and a separate buffer is used for every row read into memory. When the dataset is opened, IBX determines the maximum row buffer size by reading the database metadata and working out, on a field by field basis, how many bytes is must allocate for each field. Each row buffer is then allocated with enough space to hold the largest row.
Your error message indicates that, in this case, four bytes was allocated for the field. If the field is a text field then it is a CHAR(4) or VARCHAR(4) for a single byte character set or a CHAR(1) or VARCHAR(1) if the character set is UTF8. Alternatively, it could be a 32-bit integer field.
This error occurs when there is a mismatch between the field size saved in the form and the actual field size as reported by the database. This can occur when you have created the field using the Lazarus Fields Editor and, for some reason, the database field size has changed. This can occur if you change the field definition in the database schema or sometimes on a database upgrade. If you created the field manually in the fields editor then you may have incorrectly defined the field size.
When you create a field using the Fields Editor, the Fields Editor asks IBX what the field size is (in bytes) and is told the field size using the current database connection. That information is saved as part of the form and is persistent, There is no automatic mechanism that checks, when the dataset is later opened, that the field size reported by the database matches that saved with the form. You only find out when this error occurs.
The simplest fix is usually to delete field in the fields editor, make sure that the current database connection is with an up-to-date version of the database, and then recreate the field, again using the fields editor. That should ensure that the field size matches the database. Note that you do not usually have to change any visual control (e.g. a TDBEdit).