don't update params en TSQLQuery using Master/Detail
Original Reporter info from Mantis: pacoescriba
-
Reporter name: Paco Escriba
Original Reporter info from Mantis: pacoescriba
- Reporter name: Paco Escriba
Description:
I've two TSQLQuery: master and detail. I put a datasource with dataset link to master SQLQuery.
The master query have in SQL something like that:
'SELECT IDMASTER,NAME FROM MASTER'
The detail query have in SQL something like that:
'SELECT * FROM DETAIL WHERE IDMASTER = :IDMASTER'
I put in the datasource of the detail SQLQuery the datasource link to the master SQLQuery
I link a grid to the master query and another to the detail query. But when i scroll in the master grid, i don't change anything in detail grid.
I'm solve the problem using a hack. I put a DBEdit control, link to the field IDMASTER from master SQLQuery. At the OnChange event from the DBEdit control, i put this code
Detail.Params.ParamByName('IDMASTER').AsString := DBEDit1.Text;
if Detail.Active then Detail.Refresh;
Mantis conversion info:
- Mantis ID: 24910
- OS: Windows
- OS Build: Vista
- Build: Typhon
- Platform: Windows
- Version: 1.1 (SVN)
- Target version: 1.4