; var ADataSet: TDataSet): Boolean;var tmpADOQuery: TADOQuery;begin tmpADOQuery := GetCommQuery(); tmpADOQuery.SQL.Text := ASQLStr; tmpADOQuery.Open; Result := tmpADOQuery.RecordCount > 0; ADataSet := tmpADOQuery;end;constructor TClientAccess.Create;begin DataBaseName := ''selfold'';end; class procedure TClientAccess.CreateAlias;var tmpStrList: TStringList;begin Session.DeleteAlias(''selfold''); Session.SaveConfigFile; if not Session.IsAlias(''selfold'') then begin tmpStrList := TStringList.Create; try tmpStrList.Add(''path ='' + ExtractFilePath(Application.ExeName) + ''HS_DATA''); Session.AddAlias(''selfold'', ''STANDARD'', tmpStrList); Session.SaveConfigFile; finally tmpStrList.Free; end; end;end; procedure TClientAccess.ExecSQL(ASQLStr: string);var tmpQuery: TQuery;begin tmpQuery := GetCommQuery; tmpQuery.SQL.Text := ASQLStr; tmpQuery.ExecSQL; FreeCommQuery(tmpQuery);end; procedure TClientAccess.FreeCommQuery(AQuery: TQuery);begin AQuery.Free;end; function TClientAccess.GetCommQuery: TQuery;begin Result := TQuery.Create(nil); Result.DatabaseName := DataBaseName;end; procedure TClientAccess.InitAll;begin end; function TClientAccess.OpenSQL(ASQLStr: string; var ADataSet: TDataSet): Boolean;var tmpQuery: TQuery;begin tmpQuery := GetCommQuery; tmpQuery.RequestLive := True; tmpQuery.SQL.Text := ASQLStr; tmpQuery.Open; ADataSet := tmpQuery; Result := tmpQuery.RecordCount > 0; end;{ TDataAccess } function TDataAccess.GetSQLValue(ASQLStr: string; var AValue: Variant): Boolean;var tmpDataSet: TDataSet; i: Integer;begin Result := OpenSQL(ASQLStr, tmpDataSet); try if Result then begin AValue := VarArrayCreate([0, tmpDataSet.FieldCount], varVariant); for I := 0 to tmpDataSet.FieldCount - 1 do // Iterate begin AValue[I] := tmpDataSet.Fields[I].AsString; end; // for end; finally tmpDataSet.Close; tmpDataSet.Free; end; end; function TDataAccess.GetSQLValue(ASQLStr: string; var AValue: string): Boolean;var tmpDataSet: TDataSet;begin Result := OpenSQL(ASQLStr, tmpDataSet); try if Result then