Page 1 of 1

SQL Server Connection Method

Posted: Tue 15 Oct 2013 11:05
by MattRink
I know that UniDAC uses several different methods to connect to a SQL Server database, depending on what is available. Is it possible via UniDAC to determine what connection method is used to connect to an SQL Server database.

What I want to do is detect if the native client is being used and if not display a message informing the user to install the native client. Is this possible?

Thanks,
Matt

Re: SQL Server Connection Method

Posted: Tue 15 Oct 2013 13:53
by AndreyZ
To work with SQL Server, UniDAC uses either OLEDB or SQL Native Client provider. To make UniDAC use the SQL Native Client provider only, you should set the OLEDBProvider specific option to prNativeClient. Here is a code example:

Code: Select all

UniConnection.SpecificOptions.Values['OLEDBProvider'] := 'prNativeClient';
In this case, if there is no SQL Native Client provider installed on a computer, the "Required provider is not installed" error is generated.