1、客户端直接运行SQL命令,使用TDARemoteCommand

2、服务器端直接运行SQL命令,使用TDALocalCommand



function
DeleteRowFromTable1(aID:integer):integer;
var
lCommand:TDALocalCommand;
linp, lout: DataParameterArray;
i: integer;
begin
try
lCommand:=TDALocalCommand.Create(nil);
lCommand.ServiceName:='MyService';
linp := DataParameterArray.Create;
try
with linp.Add do begin
Name := UTF8Encode('ID');
Value := aID;
end;
lCommand.Execute('DeleteRow',linp, lout);
if lout <> nil then
for I := 0 to lout.Count - 1 do
if UTF8ToString(lout[i].Name) = 'ErrorCode' then
Result := lout[i].Value;
finally
linp.Free;
lOut.Free;
end;
finally
lCommand.Destroy;
end;
end;

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2021-07-31
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案