UniDAC ODBC DSN information

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ptyukin
Posts: 6
Joined: Thu 16 Apr 2020 18:58

UniDAC ODBC DSN information

Post by ptyukin » Thu 16 Apr 2020 19:17

Hi Devart team,

Is any way to get ODBC DSN information using UniDAC with ODBC Provider?
How can I get
- Name of ODBC driver
- ODBC SQL_SERVER_NAME value
- ODBC SQL_DATABASE_NAME value
- ODBC SQL_USER_NAME value
- ODBC SQL_DBMS_NAME value
- ODBC SQL_DBMS_VER value
used for DSN?

I tried to search in the documentation and forums with no success.

Pavel

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

Re: UniDAC ODBC DSN information

Post by MaximG » Fri 17 Apr 2020 14:26

Currently you can use UniConnection.ServerVersion and UniConnection.ServerVersionFull properties to get information about the name and version of the database server. We'll consider adding the functionality to TODBCUniProvider for getting such information.

ptyukin
Posts: 6
Joined: Thu 16 Apr 2020 18:58

Re: UniDAC ODBC DSN information

Post by ptyukin » Fri 17 Apr 2020 16:45

MaximG,

Thank you for the reply.
Can you clarify which ODBC properties are currently used to construct the UniConnection.ServerVersionFull value?

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

Re: UniDAC ODBC DSN information

Post by MaximG » Thu 30 Apr 2020 15:08

Currently, the value of ServerVersionFull is obtained by concatenating the attributes SQL_DBMS_NAME + ' ' + SQL_DBMS_VER

ptyukin
Posts: 6
Joined: Thu 16 Apr 2020 18:58

Re: UniDAC ODBC DSN information

Post by ptyukin » Thu 30 Apr 2020 15:16

MaximG,

Thank you for the clarification.
I will extract data needed from the ServerVersionFull for now.

Post Reply