1. Ganesan Rajan
  2. PowerBuilder
  3. Friday, 26 March 2021 13:10 PM UTC

Hi Experts,

Our application have been developed using PowerBuilder 2017. We connect to MS SQL Server using SQL Native Client.

When a PC is having both SQL 2008R2 and SQL 2012 Native clients, Our application picks SQL 2008 R2 (Sqlncli10) and connect to Database.

This is what we have given in our INI file for DBMS

DBMS=SNC SQL Native Client(OLE DB)

Any idea why PB2017 chooses sqlncl10 instead of sqlncli11? Are there any way to tell PB to connect to a specific native client?

Thanks in Advance,

Ganesan R

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 26 March 2021 13:42 PM UTC
  2. PowerBuilder
  3. # Permalink

Greetings, Ganesan -

The SQLNCLI11 provider is for use with SQL Server 2012 and higher, so that's why the SQLNCLI10 provider is used for SQL Server 2008. Please note the "Provider" selection in the Database Profile Setup dialog window:

If you look at the "Preview" tab in this window, you'll see that you use the "Provider" DBParm setting to specify the name of the provider. For example:

SQLCA.DBParm = "Database='xxxx',Provider='SQLNCLI11'

Best regards, John

Comment
There are no comments made yet.
Ganesan Rajan Accepted Answer Pending Moderation
  1. Friday, 26 March 2021 14:16 PM UTC
  2. PowerBuilder
  3. # 1

Thanks for the Help John.

Comment
There are no comments made yet.
Ganesan Rajan Accepted Answer Pending Moderation
  1. Friday, 26 March 2021 13:49 PM UTC
  2. PowerBuilder
  3. # 2

Thanks John.

But our customers are using SQL Server 2016.

So when you have both native clients in a machine, PB picks the older one.

In our application's connection string , should we give Provider='SQLNCLI11' so that PB will connect to Sqlncli11 ?

Thanks,

Ganesan R

 

Comment
  1. John Fauss
  2. Friday, 26 March 2021 14:11 PM UTC
You did not mention SQL Server 2016 in your original post. If you are not explicitly specifying which provider to use, then I'm not surprised that PB is selecting SNCNCLI10. Since PB cannot know the version of SQL Server it will be communicating with prior to establishing a connection, it makes sense that it would choose the older provider. I don't understand why you would not always specify the provider explicitly. I would recommend you use the SQLNCLI11 provider.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.