1. Sanjay Shivade
  2. PowerBuilder
  3. Friday, 18 January 2019

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
0
Votes
Undo

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.
  1. Friday, 18 January 2019
  2. PowerBuilder
  3. # 1
Sanjay Shivade Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Friday, 18 January 2019
  2. PowerBuilder
  3. # 2
Roland Smith Accepted Answer Pending Moderation
0
Votes
Undo

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
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. Roland Smith
  2. Friday, 18 January 2019
There are no comments made yet.
  1. Friday, 18 January 2019
  2. PowerBuilder
  3. # 3
  • Page :
  • 1


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