1. Sanjay Shivade
  2. PowerBuilder
  3. Friday, 18 January 2019 17:00 PM UTC

Hi,

 

Is SQLCA.Database = "DatabaseName" not supported by "SNC SQL Native Client(OLE DB)" driver?

 

The connection object fails to connect to the database unless it's passed as SQLCA.DBParm = "Database='databasename',Provider='SQLNCLI11'"

 

I would like SQLCA.Database to work without having to pass SQLCA.DBParm to avoid code changes.

 

Thanks!

 

Roland Smith Accepted Answer Pending Moderation
  1. Friday, 18 January 2019 21:59 PM UTC
  2. PowerBuilder
  3. # 1

The registry setting was for the PB IDE Database Profile so that I could test without changing my application.

I just noticed that when I copied the preview from the dbprofile, it didn't copy the whole thing. Here is what I have:

 

DBMS = "SNC"

 

LogId = "myuserid"

LogPass = "mypassword"

ServerName = "myserver"

Database = "mydatabase"

DBParm = "Provider='SQLNCLI11'"

 

Comment
There are no comments made yet.
Sanjay Shivade Accepted Answer Pending Moderation
  1. Friday, 18 January 2019 20:12 PM UTC
  2. PowerBuilder
  3. # 2

Roland,

Could you let me know exactly which key and value did you change in Regedit

Our app switches 'sqlca.database' name pro-grammatically so registry editing may not worked for us.

Thanks!

 

 

 

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 18 January 2019 17:57 PM UTC
  2. PowerBuilder
  3. # 3

I got the following to work in PB 2017. The DB Profile editor won't do it but I edited the profile in Regedit and went back into PB and it works.

SQLCA.DBMS = "SNC SQL Native Client(OLE DB)"
SQLCA.LogPass = <******>
SQLCA.ServerName = "hbg-pdsql2014"
SQLCA.LogId = <******>
SQLCA.AutoCommit = False
SQLCA.DBParm = "Provider='SQLNCLI11'"

You should report this as a bug in the DB Profile editor. Also the help isn't clear about this. It says Database is one of the supported properties for Microsoft SQL Server but it doesn't say via which interface (SNC, ODBC, OLE).

Comment
  1. Roland Smith
  2. Friday, 18 January 2019 19:45 PM UTC
Also of note, only the first three characters of sqlca.DBMS are used, they match with positions 3-5 of the driver name:

DBMS SNC - PBSNC170.DLL

DBMS ODBC - PBODB170.DLL

  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.