Transactions and queries - how to...
Posted: Tue 09 Dec 2008 16:34
Hi,
I have worked with the BDE for a long time and we used the IB components from Borland. We now want to use the IBCs.
When we started we tried to test a 'deep' master-detail relation: a master and 4 linked details in deep(master-detail-detail-detail-detail). We put a DBConnection, a DBTransaction and the linked queries (and some tables too) on the DataModule. When we updated data in one of the queries and posted them, all queries (and tables) of the DBConnection closed.
So I read some of the posts here and read very often, that e.g. we should use 2 transcations - one for reading and one for writing and one for each query or so. Is this true??? That would mean, that we are not able to convert our BDE based applications to IBC based application easily...even with the test apps we could not - in an easy way - update data and have the not concerned queries and tables active.
And how to apply 2 transactions to a query? Do we have to connect and reconnect these transactions programmatically for each dataset??? Is this really the way we have to do it? This would mean a lot more work for a simple application which only shows some linked data and allows to update at any level.
Is there any example of how to do this the way the IBCs exspect it?
Any hints appreciated!
Gerhard
I have worked with the BDE for a long time and we used the IB components from Borland. We now want to use the IBCs.
When we started we tried to test a 'deep' master-detail relation: a master and 4 linked details in deep(master-detail-detail-detail-detail). We put a DBConnection, a DBTransaction and the linked queries (and some tables too) on the DataModule. When we updated data in one of the queries and posted them, all queries (and tables) of the DBConnection closed.
So I read some of the posts here and read very often, that e.g. we should use 2 transcations - one for reading and one for writing and one for each query or so. Is this true??? That would mean, that we are not able to convert our BDE based applications to IBC based application easily...even with the test apps we could not - in an easy way - update data and have the not concerned queries and tables active.
And how to apply 2 transactions to a query? Do we have to connect and reconnect these transactions programmatically for each dataset??? Is this really the way we have to do it? This would mean a lot more work for a simple application which only shows some linked data and allows to update at any level.
Is there any example of how to do this the way the IBCs exspect it?
Any hints appreciated!
Gerhard