Using TQueryTableProducer

From RAD Studio
Jump to: navigation, search

Go Up to Representing a Dataset in HTML


You can produce an HTML table to display the results of a query, where the parameters of the query come from the HTTP request message. Specify the Bde.DBTables.TQuery object that uses those parameters as the Query property of a Bde.DBBdeWeb.TQueryTableProducer component.

If the request message is a GET request, the parameters of the query come from the Query fields of the URL that was given as the target of the HTTP request message. If the request message is a POST request, the parameters of the query come from the content of the request message.

When you call the Content method of TQueryTableProducer, it runs the query, using the parameters it finds in the request object. It then formats an HTML table to display the records in the resulting dataset.

As with any table producer, you can customize the display properties or column bindings of the HTML table, or embed the table in a larger HTML document.

See Also