Top Previous Next

TmySQLUpdateSQL TMySQLUpdateSQL applies updates on behalf of queries or stored procedures that can't post updates directly.


Use a TMySQLUpdateSQL object to provide SQL statements used to update read-only datasets represented by TMySQLQuery component. A dataset is read-only either by design or circumstance. If a dataset is read-only by design, the application itself does not provide a user interface for updating data, but may institute a programmatic scheme behind the scenes. If a dataset is read-only by circumstance, it indicates that the MySQL returned a read-only result set. This usually happens for queries made against multiple tables. Such queries are, by SQL-92 definitions, read-only.

TMySQLUpdateSQL provides a mechanism for circumventing what some developers consider an SQL-92 limitation. It enables a developer to provide INSERT, UPDATE, and DELETE statements for performing separate update queries on otherwise read-only result sets in such a manner that the separate update queries are transparent to the end user.

In practical application, a TMySQLUpdateSQL object is placed on a data module or form, and linked to a TMySQLQuery component through that component's UpdateObject property. If the UpdateObject property points to a valid TMySQLUpdateSQL object, the SQL statements belonging to the update object are automatically applied when updates are applied.

note BLOB parameters (including MEMO fields, GRAPHIC fields etc.) support were added in the version 2.6.2

See also: Properties, Methods