Database types

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
oz8hp
Posts: 151
Joined: Mon 18 Feb 2008 13:28
Location: Denmark
Contact:

Database types

Post by oz8hp » Thu 30 Sep 2010 06:02

I have defined
type
TDBType = (dbMySQL, dbMSSQL, dbSQLite, dbMSAccess);

const
arrDBProvider: array[TDBType] of string = ('MySQL', 'SQL Server', 'SQLite', 'Access') ;

But now I began wondering if there might be some type/const already defined that I could use. I haven't been able to find anything in manual or in the forum.

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

Post by AlexP » Thu 30 Sep 2010 11:10

Hello,

There is no such list of supported databases. However, you can use the following code to get the list of registered database providers:

var
lst: TList;
i: integer;
begin

lst:= UniProviders.LockList;
for i:= 0 to lst.Count -1 do
begin
ShowMessage(TUniProviderDesc(lst).ProviderName);
end;
end;

oz8hp
Posts: 151
Joined: Mon 18 Feb 2008 13:28
Location: Denmark
Contact:

Post by oz8hp » Thu 30 Sep 2010 13:28

OK - will have a look to see what I can do with that

oz8hp
Posts: 151
Joined: Mon 18 Feb 2008 13:28
Location: Denmark
Contact:

Post by oz8hp » Fri 01 Oct 2010 06:08

The purpose of my code is that I have made a generic databasesetup form and the type/const is used to allow me to decide the number of databasetype that the user can select in each of my apps.

It is all down to having as little work as possible :D

Post Reply