FYI - Dynamic SQL in TClientDataSets....

Dean

Member²
Just thought I'd post this because it caused me a bunch of headaches. If you're going to pass dynamic SQL through your IProvider (ala Delphi5 example for instance), make sure you do not use SQL.Text := String. You need to use the SQL := (TstringList) otherwise the internal variable FTableName is not cleared and you get the wrong constraints being returned when you next open the dataset. The wrong constraints in the TClientDataSet can cause all kinds of errors on the client side if you're not careful.
 
True. Assigning the SQL.Text or manipulating SQL.Items does not implicitly close and reopen the dataset, so it may be necessary to explicitly reopen it. Assigning the SQL property does implicitly close and reopen the dataset (which is required for correct design-time behavior).

------------------
Marco Kalter
Allround Automations
 
Back
Top