服务器端:
function TForm1.Provider1DataRequest(Sender: TObject;
Input: OleVariant): OleVariant;
var rstval:string;
begin
Query1.SQL.Text := Input;
rstval:='你的返回值';
result:=rstval;
end;
客户端:
procedure TForm1.Button1Click(Sender: TObject);
var flag:string;
begin
ClientDataset1.Close;
flag:=ClientDataset1.Provider.DataRequest('select name from yourtable where...');
ClientDataset1.Open;
if flag='...' then ...
end;