Which is better? Which is faster? Why?
1.
Using the dataset's insert, edit , post and delete procedures
OR
setting directly the SQL property and then call execsql?
2.
Using master-detail arrangement
OR
refresing the dataset in the other table's afterscroll event?
edit procedure or SQL's update?
Moderators: gto, cipto_kh, EgonHugeist
Using the "automatic" features (using the dataset's procedures and the master-detail arrangement) is certainly easier - as long as it works, but it should work in most cases. Performance should be the same, as in any case it is just SQL. If you are not content with the performance of automatically generated statements, use the Monitor component and take a look at what is really going on.
When the query is too complex Zeos can not decide how to build e.g. the update statemant. In this case you have to use TZUpdateSQL and write your own udate, insert etc. code. Sometimes Zeos generates very complicated (WHERE ... AND ... AND ...) update statement. You can control that setting TZQuery's WhereMode property to wmWhereKeyOnly, if you have a primary key. Just an example.