How can get TUniConnection.SpecificOptions default value?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
TinTin
Posts: 46
Joined: Sat 30 May 2009 14:09

How can get TUniConnection.SpecificOptions default value?

Post by TinTin » Sun 06 Oct 2013 02:59

I want to convert TUniConnection.SpecificOptions into ini files.
I call TSQLServerUniProvider.GetConnectionOptions.Text,but it only include names of SpecificOptions,not default value of SpecificOptions .

How can get TUniConnection.SpecificOptions defalut value?

thank you !

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How can get TUniConnection.SpecificOptions default value?

Post by AlexP » Mon 07 Oct 2013 11:16

Hello,

You can use the TOptionsList.GetDefaultValue method to retrieve default values:

Code: Select all

var
  OptionsList: TOptionsList;
  i: Integer;
begin
  OptionsList := SQLServerUniProvider1.GetConnectionOptions;
  for i := 0 to OptionsList.Count - 1 do begin
    ShowMessage(OptionsList[i].OptionName + ' - ' + VarToStr(OptionsList[i].GetDefaultValue));
  end;

TinTin
Posts: 46
Joined: Sat 30 May 2009 14:09

Re: How can get TUniConnection.SpecificOptions default value?

Post by TinTin » Mon 07 Oct 2013 16:38

Thank you AlexP! You are my SuperStar!
I write some code to the novice

Code: Select all

var
  OptionsList: TOptionsList;
  i: Integer;
  Msg:string;
  List:TStringList;
begin
  mmo1.Clear;
  List := TStringList.Create;
  OptionsList := SQLServerUniProvider1.GetConnectionOptions;
  for i := 0 to OptionsList.Count - 1 do
  begin
    List.Clear;
    OptionsList[i].GetValuesList(List);
    Msg := Msg+ OptionsList[i].OptionName +
      ' - ' +
    VarToStr(OptionsList[i].GetDefaultValue)+' = '+
    OptionsList[i].GetAsString(OptionsList[i].GetDefaultValue)+
    ':'+ sLineBreak+List.Text+sLineBreak;
  end ;
  List.Free;
  mmo1.Lines.Add(Msg);
end;
I want to talk about a few words about the Unidac and Firedac.

1.Firedac bundles on the Delphi IDE, popularity will be better and better
2.Unidac oracle provider have direct connecton,but Firedac havent.
3.Unidac memory table is much less than the firedac memory table.TVirtualTable must support delta/json/binary,summary,and easily UpdateApply data to remote server!
4.Unidac must develop new features, such as support SQL query memory table.
5.Unidac can config SpecificOptions on runtime.
6. The query speed must faster than Firedac.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: How can get TUniConnection.SpecificOptions default value?

Post by AlexP » Thu 10 Oct 2013 11:31

Hello,

1) Since FireDAC is built in to IDE, any updates or bugfixes are now available only on releases of updates or new versions. I.e., to update FireDAC, you will have now to buy IDE and each time migrate existing projects to a new IDE.
3) 4) These features are planned for the nearest future.
6) We are always monitoring the performance of our products and of competitive products - and our performance is higher or equal to competitors. If you find out a case, when UniDAC loses in performance, please send us a sample - and we will try to fix the behaviour as soon as possible

Post Reply