You are not logged in.
Pages: 1
Hi ab,
i updated to UniDAC 5.5.11 yesterday and get an Error Message Connecting to MySQL.
In UniDAC there is a new Validation Function which checks the SpecificOptions if you add / modify any.
Server and Port is no valid Option for this.
so i Modified SynDBUniDAC.pas a little
constructor TSQLDBUniDACConnection.Create(aProperties: TSQLDBConnectionProperties);
var options: TStrings;
PortNumber : Integer;
begin
inherited Create(aProperties);
fDatabase := TUniConnection.Create(nil);
fDatabase.ProviderName := UTF8ToString(fProperties.ServerName);
case aProperties.DBMS of
dSQLite, dFirebird, dPostgreSQL, dMySQL, dDB2:
fDatabase.Database := UTF8ToString(fProperties.DatabaseName);
else
fDatabase.Server := UTF8ToString(fProperties.DatabaseName);
end;
options := (fProperties as TSQLDBUniDACConnectionProperties).fSpecificOptions;
if fDatabase.Server='' then // see TSQLDBUniDACConnectionProperties.URI()
fDatabase.Server := options.Values['Server'];
if fDatabase.Database='' then
fDatabase.Database := options.Values['Database'];
if (fDatabase.Port=0) and TryStrToInt(options.Values['Port'], PortNumber) then
fDatabase.Port := PortNumber;
fDatabase.Username := UTF8ToString(fProperties.UserID);
fDatabase.Password := UTF8ToString(fProperties.PassWord);
// BUGFIX s.d. UniDAC 5.5.11 Überprüft ungültige Parameter
// fDatabase.SpecificOptions.AddStrings(options);
end;
I removed the last line cause Server and Port where the only Options.
Pls Check if there could be any unknown consequences i did not see.
Rad Studio 12.1 Santorini
Offline
Does http://synopse.info/fossil/info/07db9ce72a works as expected now?
Online
Just tested it and it works.
Rad Studio 12.1 Santorini
Offline
Pages: 1