Request for clarification of messages concerning TField(s) errors.
Original Reporter info from Mantis: devEric69
-
Reporter name: devEric69
Original Reporter info from Mantis: devEric69
- Reporter name: devEric69
Description:
Hello,
Sometimes, when you want to use a method like dataset.appendRecord([.../...]), you just get an error message saying "'data_1' is not a valid integer". ==> We do not know in which field we are trying to enter this bad value 'data_1' ==> if there are many fields in the table, the search can only be incremental, and last a long time.
So, there are error messages created by the fields that do not specify, neither the name of the field in question, nor its number in the "FieldDefs" (aka TFields collection in Lazarus), that the FieldDefs is dynamically created by Lazarus, or is created and then rendered persistent by the developer (by re-ordering them, as he wished).
==> I just went around the messages that are too sybillin, and I completed them to understand where to look. The additions are:
- the field name, which is a problem.
- the order of the field in its TFieldDefs. Indeed, if there is a problem in the order of the values sent via AppendRecord, it is that the position of the field is not where we think it is: indeed, some components descending from TDataset do not necessarily create a FieldDefs identical to the physical structure of the underlying table... to find the cause of the exception more quickly.
- a small homogenization of the display of the field name, always using DisplayLabel.
Mantis conversion info:
- Mantis ID: 35830
- OS: Ubuntu
- OS Build: 18.04
- Platform: Linux
- Version: 1.8.4
- Fixed in version: 3.3.1
- Monitored by: » devEric69 (devEric69)
- Target version: 3.2.0