Dynamic SQL

Purpose

This demo shows how to retrieve schema and/or data via SQL generated at runtime.

When you compile and run the server, you will see it contains a memo displaying "SQL details generated for Update will be displayed here". The demo does not actually attempt to update server data but merely display the fields that would be updated by processing the delta. See the TDynSQLService.UpdateData code in DynSQLService_Impl to see how the delta is being processed.

Having next compiled and run the client, the first thing to try is clicking on the Retrieve Schema and Data button and you should then see the Customers data displayed in the grid. Changing the text in the memo, e.g. to Select * from "Order Details" and clicking the button again results in the display of a different dataset with a totally different schema. Any of the datasets in the database (Northwind, by default) may be accessed in this manner.

Other points of interest: