Providers List in TUniConnectDialog

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
m227
Posts: 75
Joined: Mon 06 Aug 2007 12:41

Providers List in TUniConnectDialog

Post by m227 » Thu 11 Aug 2016 14:53

Hi,
Is there any way to limit providers list in TUniConnectDialog to i.e. only MySQL and MS SQL Server?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Providers List in TUniConnectDialog

Post by MaximG » Mon 15 Aug 2016 13:28

The list of available providers of the TUniConnectDialog component includes only providers that are declared in the same module with the TUniConnectDialog component. In your case, the list of included modules will look like the following :

Code: Select all

uses
  ...
  Uni, UniDacVcl, UniProvider, SQLServerUniProvider, MySQLUniProvider;

baeckerg
Posts: 2
Joined: Sun 30 Dec 2012 11:34

Re: Providers List in TUniConnectDialog

Post by baeckerg » Mon 22 Aug 2016 03:42

I have the same problem. My users need to choose whether they want to convert a MS Access Database to SQLite or MySQL. Therefore I have in my uses clause

Code: Select all

  
ODBCUniProvider, AccessUniProvider, UniProvider, SQLiteUniProvider, DAScript,
  UniScript, CRBatchMove, DALoader, UniLoader, UniDacVcl, MySQLUniProvider
which shows ODBC and Access as well in the dialog. It would be nice to have a possibility to exclude them from the list.

Regards
Gernot

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Providers List in TUniConnectDialog

Post by MaximG » Tue 23 Aug 2016 09:10

Yes, you are absolutely right. TAccessUniProvider is a descendant from the TODBCUniProvider class, therefore ODBC appears in the list of available providers in UniConnectDialog. You can override this behavior using UniDAC sources. In addition, you can implement your own dialog. There is a sample of creating such a dialog in our demo: [UniDAC install folder]\Demos\UniDacDemo\ConnectDialog\

Post Reply