📄 tdataset_insertrecord.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.InsertRecord
<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>
</font>
</td>
</tr>
</table>
<br><br>
<span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">Inserts a new, populated record to the dataset and posts it to the database.
<br>
<br>
<b>procedure </b>InsertRecord(const Values: <b>array of const</b>);
<br>
<br>
<b>Description</b>
<br>
Call InsertRecord to create a new, empty record at in the dataset, populate it with the field values in Values, and post the values to the database.
<br>
<br>
A newly inserted record is posted to the database in one of three ways:
<br>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="14"></td><td width="25"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000"><font face="Symbol" size="2" color="#000000">·</font></span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="14"></td><td width="25"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000"><font face="Symbol" size="2" color="#000000">·</font></span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">For unindexed Paradox tables, the record is inserted into the dataset at the current cursor position.
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="14"></td><td width="25"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000"><font face="Symbol" size="2" color="#000000">·</font></span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">For unindexed dBASE, FoxPro, and Access tables, the record is inserted into the dataset at the end.
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="14"></td><td width="25"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000"><font face="Symbol" size="2" color="#000000">·</font></span></td><td><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.
<br>
</span></td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td width="14"></td><td width="25"><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000"></span></td><td></td></tr></table><span style="font-family:Helvetica,Arial; font-size:10pt; color:#000000">
<br>
The newly inserted record becomes active.
<br>
</span></span>
<!--#include virtual="/inc/footer.php"-->
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -