Page 1 of 1

UniDAC ODBC DSN information

Posted: Thu 16 Apr 2020 19:17
by ptyukin
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

Re: UniDAC ODBC DSN information

Posted: Fri 17 Apr 2020 14:26
by MaximG
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.

Re: UniDAC ODBC DSN information

Posted: Fri 17 Apr 2020 16:45
by ptyukin
MaximG,

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

Re: UniDAC ODBC DSN information

Posted: Thu 30 Apr 2020 15:08
by MaximG
Currently, the value of ServerVersionFull is obtained by concatenating the attributes SQL_DBMS_NAME + ' ' + SQL_DBMS_VER

Re: UniDAC ODBC DSN information

Posted: Thu 30 Apr 2020 15:16
by ptyukin
MaximG,

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