12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

454 Day 12<br />

Table 12.13. TQuery key methods.<br />

Event Catalyst<br />

AfterCancel Occurs follow<strong>in</strong>g a Cancel.<br />

AfterClose Occurs follow<strong>in</strong>g the close of the TDataset.<br />

AfterDelete Occurs follow<strong>in</strong>g a Delete.<br />

AfterEdit Occurs follow<strong>in</strong>g an Edit.<br />

AfterInsert Occurs follow<strong>in</strong>g an Insert or Append.<br />

AfterOpen Occurs after a TDataset is opened.<br />

AfterPost Occurs follow<strong>in</strong>g a Post.<br />

BeforeCancel Occurs prior to a Cancel.<br />

BeforeClose Occurs before the close of the TDataset.<br />

BeforeDelete Occurs prior to a Delete.<br />

BeforeEdit Occurs prior to an Edit.<br />

BeforeInsert Occurs prior to an Insert or Append.<br />

BeforeOpen Occurs before a TDataset is opened.<br />

BeforePost Occurs prior to a Post.<br />

OnCalcFields Occurs when calculated fields need values.<br />

OnDeleteError Occurs when there is a problem delet<strong>in</strong>g a record.<br />

OnEditError Occurs when there is a problem edit<strong>in</strong>g a record.<br />

OnFilterRecord Occurs when filter<strong>in</strong>g is active and the TDataset needs a row.<br />

OnNewRecord Occurs when a new record is added to the TDataset.<br />

OnPostError Occurs when there is a problem post<strong>in</strong>g a record.<br />

OnUpdateError Occurs when there is a problem while apply<strong>in</strong>g cached updates.<br />

OnUpdateRecord Occurs for each row saved by a call to ApplyUpdates.<br />

Key Elements<br />

SQL statements that do not return a result set can also be executed. This <strong>in</strong>cludes calls to the<br />

SQL INSERT, UPDATE, and DELETE commands, for example. Use the ExecSQL method for these<br />

types of queries.<br />

The DatabaseName property specifies the database you want to query. The SQL property<br />

specifies the s<strong>in</strong>gle SQL statement that you want to use <strong>in</strong> the query. When you query local<br />

tables, use Local SQL. When query<strong>in</strong>g server tables, you can use any SQL syntax that your

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!