1. Sim Joo Pee
  2. PowerBuilder
  3. Thursday, 13 October 2022 06:57 AM UTC

Hi Sir or Madam,

Recently our database has just moved from sybase to Microsoft sql server 2019. And PB build app/exe connect to db using ini file. I am using PB2019R3.

[Profile D]
DBMS = "MSOLEDBSQL"
ServerName = "200.200.11.24"
LogId = "dba"
AutoCommit = False
DBParm = "Database='dxx',TrimSpaces=1"

So, my question are, I need your help to verify the new ini file that i changed is correct.

1. Is the above correct?

2. What should i do to change the "Servername=200.200.11.24" to "Servername=ms_db_d"?

3. When deployed the PBD build exe to end user PC, what is the client software to install?

John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 25 October 2022 03:28 AM UTC
  2. PowerBuilder
  3. # 1

When you use SQL Server Management Studio to connect to the DB server, the Server Name used in the Connect to Server dialog window is what you should use as the SQLCA.ServerName property value:

SQLCA.DBMS = "MSO"
SQLCA.ServerName = "xxxxxxxxxxxxxxxxxxxx"  // Same ServerName value used in SMSS.
SQLCA.AutoCommit = False
SQLCA.DBParm = "Database='xxxxxxx',TrustedConnection=1,DateFormat='mm/dd/yyyy',DateTimeFormat='mm/dd/yyyy hh:mm:ss',TimeFormat='hh:mm:ss'"

I personally prefer using Windows Authentication (Windows login/password) for my SQL Server login. This translates into the DBParm: TrustedConnection=1, as shown above. You may not need to specify DateFormat, DateTimeFormat and TimeFormat settings, but I use these parms so I've included them here.

I'm including below a link to some information regarding connecting to SQL Server from PB that I recommend you read through and might find helpful:

   https://docs.appeon.com/pb2019r3/connecting_to_your_database/ch03s04.html

Best regards, John

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 October 2022 16:11 PM UTC
  2. PowerBuilder
  3. # 2

If using PB 2019 R3, you need to install v18 of the MSOLEDBSQL driver (not v19): https://www.microsoft.com/en-us/download/details.aspx?id=56730&WT.mc_id=DOP-MVP-37580

You also need to deploy additional runtime DLL with your app: PBMSOLEDBSQL.dll

As far as the connection string, just create a DB profile in the PB IDE and it will provide you the correct syntax: https://docs.appeon.com/pb2022/connecting_to_your_database/Using_database_profiles.html#XREF_83605_Creating_a

Comment
  1. Sim Joo Pee
  2. Tuesday, 25 October 2022 00:56 AM UTC
Noted Armeen, i will try and let you know again . Thanks.
  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.