function TDBbase.OpenSql(var sSQL, reData, error: OleVariant): OleVariant;begin Result := False; if sSql<>'' then try adq_open.Close; adq_open.SQL.Text := sSQL; adq_open.DisableControls; adq_open.Open; reData := dsp_open.Data;//客户端用 TCLIENTDATASET接收 这个是MIDAS 方式 最好采用 RO开发效果要好一些 Result := True; SetComplete; except on E:Exception do begin error := E.Message; adq_open.Close; SetAbort; end; end;end;