Getting SpecificOptions Values
Posted: Mon 24 Oct 2011 07:48
I'm trying to acces the values of SpecificOptions for TuniConnection but they all seem to be blank.
What am I doing wrong ?
var
x : Integer;
OptionsList: TOptionsList;
begin
UniConnection2.ProviderName := 'Oracle';
OptionsList := TUniProvider(UniProviders.GetProvider(UniConnection2.ProviderName)).GetConnectionOptions;
memo1.Lines.Add( UniConnection2.ProviderName+ ' Options Count = '+ inttostr( OptionsList.Count)) ;
for x := 0 to OptionsList.Count -1 do
begin
memo1.Lines.Add( OptionsList[x].OptionName + ' = '+
UniConnection2.SpecificOptions.Values[OptionsList[x].OptionName] )
end;
end;
Output to Memo1 ->
Oracle Options Count = 23
CharLength =
Charset =
ClientIdentifier =
ConnectionTimeout =
ConnectMode =
DateFormat =
DateLanguage =
Direct =
HomeName =
OptimizerMode =
PoolingType =
PrecisionBCD =
PrecisionFloat =
PrecisionFMTBCD =
PrecisionInteger =
PrecisionLargeint =
PrecisionSmallint =
Schema =
StatementCache =
StatementCacheSize =
ThreadSafety =
UseOCI7 =
UseUnicode =
What am I doing wrong ?
var
x : Integer;
OptionsList: TOptionsList;
begin
UniConnection2.ProviderName := 'Oracle';
OptionsList := TUniProvider(UniProviders.GetProvider(UniConnection2.ProviderName)).GetConnectionOptions;
memo1.Lines.Add( UniConnection2.ProviderName+ ' Options Count = '+ inttostr( OptionsList.Count)) ;
for x := 0 to OptionsList.Count -1 do
begin
memo1.Lines.Add( OptionsList[x].OptionName + ' = '+
UniConnection2.SpecificOptions.Values[OptionsList[x].OptionName] )
end;
end;
Output to Memo1 ->
Oracle Options Count = 23
CharLength =
Charset =
ClientIdentifier =
ConnectionTimeout =
ConnectMode =
DateFormat =
DateLanguage =
Direct =
HomeName =
OptimizerMode =
PoolingType =
PrecisionBCD =
PrecisionFloat =
PrecisionFMTBCD =
PrecisionInteger =
PrecisionLargeint =
PrecisionSmallint =
Schema =
StatementCache =
StatementCacheSize =
ThreadSafety =
UseOCI7 =
UseUnicode =