时间:2021-07-01 10:21:17 帮助过:25人阅读
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);
TSynDBDataSet内存表
标签:cli create source tco top update soc syn nbsp