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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Event Catalyst<br />

<strong>C++</strong>Builder Database Architecture<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 />

You use the DatabaseName property to specify the database you want to access. It po<strong>in</strong>ts either<br />

to a local application-specific alias or to one that you’ve def<strong>in</strong>ed us<strong>in</strong>g the Database Explorer<br />

or the BDE Configuration utility.<br />

The TableName property po<strong>in</strong>ts to the physical database table. On some platforms it may also<br />

<strong>in</strong>clude the name of the table’s home database and/or that of the table’s owner or schema.<br />

Set the IndexName or IndexFields property to make use of a secondary <strong>in</strong>dex with the table.<br />

To establish a master/detail relationship with another table, set the MasterSource property<br />

to reference a TDataset that shares a common key with this one. Once MasterSource is set,<br />

specify the key fields <strong>in</strong> the master DataSource us<strong>in</strong>g the MasterFields property. These keys<br />

must correspond with those of the current <strong>in</strong>dex, as specified by IndexName or IndexFields.<br />

445<br />

12

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

Saved successfully!

Ooh no, something went wrong!