Hello @egsuh,
Does TSQLQuery provide Master-detail relationship? I remember old Delphi TTables, which defined master-detail relationship. I think that TSQLite3DataSet may provide such functionality, but not sure about TSQLQuery.
Yes, it can, it's exactly the same thing
.
For your information, this is what the documentation for
tsqlquery.datasource says:
"When Open or ExecSQL is called, and the Datasource property is not Nil then for each parameter for which no value was explicitly set (its Bound property is False), the value will be retrieved from the dataset connected to the datasource." Said differently, the values of the parameter(s) in the SQL clause
"WHERE details.master_record_no = :master_record_no" in the query's details are retrieved automatically from the current value of the pointed TDataset's
"master.master_record_no" field, through this TDataset.Datasource property.
In addition, TSQLQuery allows a deeper filtering with its SQL
"WHERE" SQL clause, which is finer than a simple TTable that does a SQL
"fetch all" (not necessarily ad'hoc for the network, when there are large amounts of data).
I might need to implement such relationship later.
I've tested SQLite with Zeos components: it works very well (having said that, I have only queried and used small tables).