It is impossible to manually set the table name in unit sqldb, class TCustomSQLQuery
Original Reporter info from Mantis: havezet
-
Reporter name: Hert Vanz
Original Reporter info from Mantis: havezet
- Reporter name: Hert Vanz
Description:
Normally the FTableName is parsed automatically. However, when using joined queries it is impossible to determine the FTableName based on the query. Then when switching the dataset one of the edit modes (insert/update) the generated query misses the Table name.
In Delphi (7) an event is called when the TableName is not set to allow the programmer to alter the generated table name. In Lazarus I didn't find any way to customize the table name.
Additional information:
An easy fix would be to introduce a protected property in TCustomSQLQuery to manually set the private FTableName property;
property TableName: string read FTableName write FTableName;
This will, at least, allow derived classes to manually alter the generated FTableName (or the empty FTableName, as in the case I described above)
Mantis conversion info:
- Mantis ID: 20395
- OS: all
- OS Build: all
- Build: ?
- Platform: all
- Version: 2.5.1
- Fixed in version: 2.6.1
- Fixed in revision: 27074 (#3c015a3a)
- Target version: 3.0.0