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.

470 Day 12<br />

Table 12.28. cont<strong>in</strong>ued<br />

TDateTimeField Date and time values.<br />

TDateField Date values.<br />

TTimeField Time values.<br />

TBlobField Variable-length field with no size limit.<br />

TBytesField Variable-length field with no size limit.<br />

TVarBytesField Variable-length field up to 65,535 characters.<br />

TMemoField Variable-length text field with no size limit.<br />

TGraphicField Variable-length graphics field with no size limit.<br />

You never specifically drop a TField descendant on a form. As mentioned, these are created<br />

for you, either via the Fields Editor or automatically when a TDataset is opened.<br />

Tasks<br />

TFields support a number of column-based sett<strong>in</strong>gs that you can use to customize your<br />

applications. You specify these sett<strong>in</strong>gs us<strong>in</strong>g the Fields Editor of a TDataset. You access the<br />

Fields Editor by right-click<strong>in</strong>g a TDataset component and select<strong>in</strong>g Fields Editor from the<br />

pop-up menu.<br />

For example, to prevent modifications to a field, right-click its TDataset, select Fields Editor,<br />

and then set the field’s ReadOnly property to true <strong>in</strong> the Object Inspector. To make a field<br />

<strong>in</strong>visible <strong>in</strong> a DBGrid, set its Visible property to false. If you want to control the types of<br />

characters allowed <strong>in</strong> the field, specify a mask <strong>in</strong> its EditMask property. To change the database<br />

field to which the TField is l<strong>in</strong>ked, change its FieldName property to the field you want to<br />

reference.<br />

NOTE<br />

TField Descendant Type of Data Stored<br />

Note that TField’s Visible property only controls whether a column<br />

appears <strong>in</strong> a DBGrid component if no columns have been def<strong>in</strong>ed us<strong>in</strong>g<br />

the grid’s Columns property.

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

Saved successfully!

Ooh no, something went wrong!