⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tdataset_fieldbyname.htm

📁 Absolute Database 5.12 src. Absolute Database lets you forget the Borland Database Engine (BDE). Th
💻 HTM
字号:
<html>
<head>
   <title></title>
</head>

<!--#include virtual="/inc/header.php"-->


<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">
  <tr>
    <td align="left">
      
<span style="font-family:Helvetica,Arial; font-size:12pt; color:#000000"><b>TDataSet.FieldByName
<br>
</b><span style="font-family:Helv; font-size:9pt; color:#000000"><span style="font-family:Helv; font-size:9pt; color:#7F0000"><a href=tdataset.htm>TDataSet</a></span></span><span style="font-family:Helvetica,Arial; font-size:12pt; color:#000000"><b>
<br>
</b></span></span>
    </td>
    <td align="right">
     <font face="Arial" size="2">
     
     <a href="overview.htm">Top</a>&nbsp;
     
     </font>
    </td>
  </tr>
</table>
<br><br>



<span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Finds a field by its name.
<br>

<br>
<b>function </b>FieldByName(const FieldName: string): TField;
<br>

<br>
<b>Description</b>
<br>
Call FieldByName to retrieve field information for a field whith only name given. FieldName is the name of an existing field. FieldByName returns the TField component for the specified field. If the specified field does not exist, FieldByName raises an EDatabaseError exception.
<br>

<br>
FieldName can be the name of a simple field, the name of a subfield of an object field that has been qualified by the parent field's name, or the name of an aggregated field. Because of this flexibility, it is often preferable to use FieldByName rather than the Fields property or the AggFields property.
<br>

<br>
An application can directly access specific properties and methods of the field returned by FieldByName. For example, the following statement determines if a specified field is a calculated field or not:
<br>

<br>
<b>if </b>Customers.FieldByName('FullName').Calculated <b>then</b>
<br>

<br>
  MessageDlg(Format('%s is a calculated field. ', ['FullName']), mtInformation, [mbOK], 0);
<br>

<br>
FieldByName is especially useful at design time for developers who are creating database applications, but when there is no access to the underlying table and therefore persistent field components could not be used.
<br>

<br>
<b>Note:
<br>
</b>To retrieve or set the value for a specific field, call the default dataset method FieldValues instead of FieldByName.
<br>
</span>

<!--#include virtual="/inc/footer.php"--> 
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -