Dataset field editor shows exception for a lookup field from a dataset without table name
Original Reporter info from Mantis: Simon Ameis @SAmeis
-
Reporter name: Simon Ameis
Original Reporter info from Mantis: Simon Ameis @SAmeis
- Reporter name: Simon Ameis
Description:
The editor for TDateset fields shows an exception if the user wants to add a lookup field from another Dataset, which has no table name set.
I think, the user should see a nice hint like "Please set table name" instead of "Kill Lazarus yes/no".
If you set a table name but no FileName (I used TSQLite3Dataset with a database file), the appropriate error for an empty file name is shown.
Steps to reproduce:
- Create a new project
- Place two TDataset descendants of your choice — I chose TSQLite3Dataset from package sqlite3laz — on the form (leave at least one of the properties FileName or TableName
- Right click on one dataset and open field editor ("Edit Fields..."), click on the butten "New..." (third button from the right)
- Select "lookup" as field type, type in an arbitrary name for the key field
- Now you can select the other dataset as lookup dataset and watch the exception dialog
Additional information:
The exception might be cought in ideintf/newfield.pas TNewFieldFrm.DataSetsComboChange (TNewFieldFrm is actually the form to create the lookup field), but unfortunately I don't know which ressourcestrings to use …
Mantis conversion info:
- Mantis ID: 19924
- Build: 31807
- Version: 0.9.31 (SVN)
- Fixed in version: 1.3 (SVN)
- Fixed in revision: 46563 (#3227d9ff)
- Monitored by: » luizamerico (Luiz Americo)
- Target version: 1.4