Opening TOracleDataset without returning records

Boris

Member
Is there any (easy) way to force TOracleDataset to open but not to execute SQL statement?
I have complex queries which takes lots of time to execute. I done lots of SQL tuning, and managed to lower it to allmost reasonable measure, but it would be much easier just to open dataset without executing SQL select statement, so that users can immediate enter new records.
I know there is a workaround with some SQL modifications, etc. adding a condition in SQL with variable that initialy has a value that forces zero rows returned (.. where 1 = :X... initialy set to 0).
But that's ugly, and I have to do much modifications...

One property colud solve it all :-).
 
Originally posted by Boris:
Is there any (easy) way to force TOracleDataset to open but not to execute SQL statement?
One property colud solve it all :-).
Not Really. This is one of the trade offs between "live" "data aware" datasets and disconnected mode.

I suggest you look at using a TClientDataset
linked to your TOracleDataset. This will allow you to use a where clause that returns no records and cached updates which will prevent new records from "flying away" each time you post them.

However, remember the records are only "posted" to the ClientDataset. They are only "posted" to Oracle when you ApplyUpdates.

Hope this helps - Clive.
 
Back
Top