Skip to content

Commit

Permalink
Issue #120: Allow unsupported ADODB providers per registry hack
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Jun 24, 2020
1 parent c7c07aa commit 1981afd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion source/apphelpers.pas
Expand Up @@ -148,7 +148,7 @@ TQueryThread = class(TThread)
asWrapLongLines, asDisplayBLOBsAsText, asSingleQueries, asMemoEditorWidth, asMemoEditorHeight, asMemoEditorMaximized,
asMemoEditorWrap, asDelimiter, asSQLHelpWindowLeft, asSQLHelpWindowTop, asSQLHelpWindowWidth,
asSQLHelpWindowHeight, asSQLHelpPnlLeftWidth, asSQLHelpPnlRightTopHeight, asHost,
asUser, asPassword, asCleartextPluginEnabled, asWindowsAuth, asLoginPrompt, asPort, asLibrary,
asUser, asPassword, asCleartextPluginEnabled, asWindowsAuth, asLoginPrompt, asPort, asLibrary, asAllProviders,
asPlinkExecutable, asSSHtunnelHost, asSSHtunnelHostPort, asSSHtunnelPort, asSSHtunnelUser,
asSSHtunnelPassword, asSSHtunnelTimeout, asSSHtunnelPrivateKey, asSSLActive, asSSLKey,
asSSLCert, asSSLCA, asSSLCipher, asNetType, asCompressed, asLocalTimeZone, asQueryTimeout, asKeepAlive,
Expand Down Expand Up @@ -3516,6 +3516,7 @@ constructor TAppSettings.Create;
InitSetting(asLoginPrompt, 'LoginPrompt', 0, False, '', True);
InitSetting(asPort, 'Port', 0, False, '', True);
InitSetting(asLibrary, 'Library', 0, False, 'libmariadb.dll', True);
InitSetting(asAllProviders, 'AllProviders', 0, False);
InitSetting(asPlinkExecutable, 'PlinkExecutable', 0, False, '');
InitSetting(asSSHtunnelHost, 'SSHtunnelHost', 0, False, '', True);
InitSetting(asSSHtunnelHostPort, 'SSHtunnelHostPort', 22, False, '', True);
Expand Down
12 changes: 8 additions & 4 deletions source/dbconnection.pas
Expand Up @@ -1685,10 +1685,14 @@ function TConnectionParameters.GetLibraries: TStringList;
rx := TRegExpr.Create;
rx.ModifierI := True;
case NetTypeGroup of
ngMySQL: rx.Expression := '^lib(mysql|mariadb).*\.dll$';
ngMSSQL: rx.Expression := '^(MSOLEDBSQL|SQLOLEDB)$';
ngPgSQL: rx.Expression := '^libpq.*\.dll$';
ngSQLite: rx.Expression := '^sqlite.*\.dll$';
ngMySQL:
rx.Expression := '^lib(mysql|mariadb).*\.dll$';
ngMSSQL: // Allow unsupported ADODB providers per registry hack
rx.Expression := IfThen(AppSettings.ReadBool(asAllProviders), '^', '^(MSOLEDBSQL|SQLOLEDB)$');
ngPgSQL:
rx.Expression := '^libpq.*\.dll$';
ngSQLite:
rx.Expression := '^sqlite.*\.dll$';
end;
case NetTypeGroup of
ngMySQL, ngPgSQL, ngSQLite: begin
Expand Down

0 comments on commit 1981afd

Please sign in to comment.