1. Ravi Nath
  2. PowerServer
  3. Thursday, 13 July 2023 16:44 PM UTC

Hi,

 

We have an app we are developing an app in Powerbuilder 2022 build 1900 where we set the app name in the database connection string when connecting to SQL Server 2019. We are using ODBC driver.

The issue is when we run the app like a regular Powerrbuilder desktop app it sets the app name correctly but when we deploy it to Powerserver it comes out as blank.

 

Is this a bug ? We need to be able to identify the connection by a user and so we set the name in there. We use a common login credential for connecting to db.

 

string ls_connectstring

 

sqlca.dbms = 'ODBC'

ls_connectstring = 'DSN=My SQL SERVER;UID='+ "xxxxxx"+';PWD=xxxxxx;app=User10'
sqlca.dbparm     = "Connectstring='"+ls_connectstring+"'"

 

connect using sqlca ;

 

Thanks

 

Ravi Nath

 

 

 

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 July 2023 17:44 PM UTC
  2. PowerServer
  3. # 1

HI Ravi ;

  Make sure that you also set the UID & PWD in SQLCA as well, as follows:

  • SQLCA.Logid     = "XXXX"
  • SQLCA.LogPass  = "YYY"

  Then also make sure that your PS Project is set to use these values, as follows:

HTH

Regards ... Chris

Comment
There are no comments made yet.
Ravi Nath Accepted Answer Pending Moderation
  1. Friday, 14 July 2023 13:44 PM UTC
  2. PowerServer
  3. # 2

Hi Chris,

 

We are connecting to SQL Server 2019 in our app. The connection goes through fine its just that the AppName is blank.

The option Allow dynamic connections using the transaction logID and LogPass   is checked.

I have also tried the following. I am able to connect to the db server but the app name is not being set.

    SQLCA.DBMS =  "OLEDB"
    SQLCA.LogId = "xxxx"
    SQLCA.LogPass = "xxxx"
    sqlca.dbparm     = "CacheName='MySqlServer',PROVIDERSTRING='app=user10'"

 

Thanks,

Ravi Nath
   

 

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 14 July 2023 15:56 PM UTC
  2. PowerServer
  3. # 3

Hi Ravi;

  The AppName in a PowerServer based App is set in the PowerServer middle tier. For example ...

Unfortunately .. A) The SS DB Driver does not support this option currently and B) The value is currently "fixed" as "PowerServer".

My suggestion would be to open a Support Ticket as an enhancement request that ...

A) The SS DB driver in PS support the AppName in it's configuration options   // AND

B) the AppName as set in the DBParm field would also be routed over to SS from PS's middle tier.

HTH

Regards ... Chris

Comment
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.