TSynDBDataSet内存表

TSynDBDataSet内存表

SynDBMidasVCL.pas

 TSynDBDataSet = class(TCustomClientDataSet)

Props := TSQLDBSocketConnectionProperties.Create('127.0.0.1:6789', 'jj', 'admin', 'admin');
cds := TSynDBDataSet.Create(Self);
cds.Connection := Props;

查询:

cds.Close;
cds.CommandText := 'select top 100 * from t2 '; //定义一个查询串
cds.Open;

DataSource1.DataSet := cds;

保存:

if cds.State in [dsinsert,dsedit] then
cds.Post;
if cds.ChangeCount > 0 then
cds.ApplyUpdates(0);

posted @ 2017-12-16 16:09  delphi中间件  阅读(1034)  评论(0编辑  收藏  举报