1. Hannu Pikkarainen
  2. PowerBuilder
  3. Friday, 23 March 2018 11:12 AM UTC

SQL server used is MS SQL 2012 and I can connect it with Native Client (OLE DB) without problems from PB 2017R2 Database profiles. When I copy connection setting I get :

// Profile Mara_test_Native
SQLCA.DBMS = "SNC SQL Native Client(OLE DB)"
SQLCA.LogPass = <********>
SQLCA.ServerName = "SUNI1703\sqlexpress"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = "Database='SHR',Provider='SQLNCLI11'"

I paste and edit it to application ini-file to :

DBMS = "SNC SQL Native Client(OLE DB)"
LogPass = something
ServerName = SUNI1703\sqlexpress
LogId = sa
AutoCommit = False
DBParm = "Database='SHR',Provider='SQLNCLI11'"

When application is run connection fails. Connection is successful when using ODBC driver, but then I can't access a blod-data (Word documents) stored in database. Native client has been used several years with previous versions of PB and SQL without problems.


Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 23 March 2018 13:28 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Hannu;

   The native SNC connection should work great in your deployed PB App EXE's. Just remember that this feature will require two things to be installed on your deployed PC's ...

  1. The SS Client run-time that includes the SS SNC drivers
  2. PB's DB Interface driver for SS  ... PBSNC170.DLL


Regards ... Chris

  1. Hannu Pikkarainen
  2. Monday, 26 March 2018 08:20 AM UTC
Hi Chris, using debugger really helped. I noticed that the n_tr transaction object did not get Database and Logpass attributes when ini-file was read by of_init function (PFC PB9.0). All attributes needed for connection were updated correctly.

I found a workaround. I first use of_init-function, then update manually n_tr.Database = 'SHR' and n_tr.Logpass = 'Something' --> connection successful

This works in this special case, but it would be better if everything needed could be adjusted with ini-file.

BR, Hannu



  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 23 March 2018 12:35 PM UTC
  2. PowerBuilder
  3. # 1

Hi Hannu,

Have you tried a breakpoint just before your CONNECT to investigate your transaction object at that particular moment in time?

Looking at your INI file snippet I see that some items use quotes, others don't. My guess is that by removing the quotes for DBMS and DBParm solves your problems.

HTH /Michael

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.