DA服务器端 执行SQL命令 和查询 SQL语句
procedure TNewService.testoperation;
var
Cmd : IDASQLCommand;
acon: IDAConnection;
SqlDST: IDADataset;
begin
acon := ServerDataModule.ConnectionManager.NewConnection('New ADO Connection to ColinCodeData',true) ;
Cmd := acon.NewCommand('',stSQL);
Cmd.SQL := 'update table_1 set a = ''8''';
Cmd.Execute;
SqlDST := acon.NewDataset('select * from Customers');
SqlDST.RefreshParams;
SqlDST.Open;
while not SqlDST.Eof do
begin
ServerForm.Memo1.Lines.Add(SqlDST.FieldByName('name').AsString);
SqlDST.Next;
end;
end;