Cached Updates and master detail relationship
Posted: 07.06.2007, 17:06
Hello!
I need to have one or more transaction firing together, but to have this
situation I shoud have more than one connection as there's no Transaction
component , but sometimes it can be very slow starting a new connection.For this reason I am trying my hand to the cached updates. It is simple when I need to update one table, but I have problems in master-detail relationship. I probably fail in doing something, but really can understand where.
I use autoincrement indexes so I don't know the master key until I apply updates. I use two TZQuery components , and try to set mastersource,masterkey and linkedfields, but seems not to work well, each time I apply master's updates, I loose all records in the detail ( master maybe refreshes the detail). The same thing happens if I join the two tables using datasource property and the WHERE ID = :ID in the select. How can I menage master detail and cached updates? Thanks for any advice.
Marco
I need to have one or more transaction firing together, but to have this
situation I shoud have more than one connection as there's no Transaction
component , but sometimes it can be very slow starting a new connection.For this reason I am trying my hand to the cached updates. It is simple when I need to update one table, but I have problems in master-detail relationship. I probably fail in doing something, but really can understand where.
I use autoincrement indexes so I don't know the master key until I apply updates. I use two TZQuery components , and try to set mastersource,masterkey and linkedfields, but seems not to work well, each time I apply master's updates, I loose all records in the detail ( master maybe refreshes the detail). The same thing happens if I join the two tables using datasource property and the WHERE ID = :ID in the select. How can I menage master detail and cached updates? Thanks for any advice.
Marco