TFDCustomMemTable.AppendData
来源:互联网 发布:音轨软件有哪些 编辑:程序博客网 时间:2024/05/01 22:56
procedure AppendData(const AData: IFDDataSetReference; AHitEOF: Boolean = True);
Appends data to this dataset from other datasets.
Use the AppendData method to append the rows from one FireDAC dataset to this dataset. The property is a shortcut for theData property and theCopyDataSet method.
If this dataset is inactive, then it inherits the structure from AData
, gets activated and rows are appended. When this dataset is active, then rows are imported and only compatible fields are filled.
The property is for the TClientDataSet compatibility.
如果当前内存数据集不是活动的,则复制AData的结构及记录,如果是活动的,则只复制与AData相同记录数的同名字段数据
eg.
FDMemTable1.Close ;
FDQuery1.Connection := FDConnection1;FDQuery1.Open('select A1, A2 from TB');FDMemTable1.AppendData(FDQuery1); -- 执行后 FDMemTable1与 FDQuery1 的记录与字段结构一致
FDQuery2.Connection := FDConnection2;FDQuery2.Open('select A1, A2, A3 from TB');FDMemTable1.AppendData(FDQuery2); -- 执行后 FDMemTable1只会将 FDQuery2字段A1, A2的数据复制过来
FDQuery3.Connection := FDConnection2;FDQuery3.Open('select A4 from TB');FDMemTable1.AppendData(FDQuery3); -- 执行后 FDMemTable1只会产生与 FDQuery3相同记录数的数据, 原有 A1, A2是空的注:
FDMemTable1.AppendData(FDQuery3) 与 FDMemTable1.AppendData(FDQuery3.Data)有差异FDMemTable1.AppendData(FDQuery3): 如果FDQuery3有过滤,则只Append过滤后的数据, 如果使用FDQuery3.Data,则无论FDQuery3是否过滤
都会复制
0 0
- TFDCustomMemTable.AppendData
- Script & Tool之Appenddata
- FFmpeg 编码器AVCodecContext参数设置
- ECMAScript 6 笔记(五)
- ffmpeg 编码器AVCodecContext 的配置参数
- 多台笔记本同时上网方法
- MongoDB3.2 安全(一)---authentication
- TFDCustomMemTable.AppendData
- linux执行crontab、脚本命令及chmod
- QT 工程文件
- 给SSD(固态硬盘)编程
- 如何对思维导图设置语言
- 单例模式
- 数字三角形问题 动态规划问题 状态转移方程
- ExtJS做Ajax请求的超时设置——timeout属性
- 遍历jsonArray