1. billy hugon
  2. PowerBuilder
  3. Monday, 11 December 2023 17:20 PM UTC

I'm in the beginning stages of converting my Oracle database to SqlServer.  I have the tables moved and imported using SSMS.  Now I'm to the point of setting up a DB Profile in Powerbuilder.  Can anyone advise as to what driver to use for my LocalDB setup?  I currently have these drivers available.  I have tried ODB ODBC and MSOLEDBSQL SQL Server. but get errors connecting.  My local db is defined as (LocalDb)\MSSQLLocalDB.  No success yet.

 

 

 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 17:23 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Billy;

  This is all I do to use PB with SS02022 ....

 If you are running SS "express" locally, then all you need is Server = "LocaHost"

Note: PB uses the TCP/IP protocol only to communicate with SS. In SS Express, this protocol is disabled by default on installation. You MUST enable this protocol n the SS Configuration dialogue otherwise, you will never connect from a PB App / PB IDE to SS.  HTH

Regards ... Chris

Comment
  1. billy hugon
  2. Tuesday, 12 December 2023 17:26 PM UTC
Thanks Chris. I'll keep that in mind. It is working now and I am in the process of converting the datawindows.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 12 December 2023 17:35 PM UTC
That's awesome news Billy .. thanks for the update!

Don't forget to "hug" a DataWindow today! ;-)
  1. Helpful
There are no comments made yet.
billy hugon Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 16:35 PM UTC
  2. PowerBuilder
  3. # 1

Hi.  Yes, I have been using SSMS for the conversion no problem.  It was PB I was having an issue with.  I finally got it to work using the below.

 

 

 

Thanks for your help

 

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 12 December 2023 17:06 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 03:49 AM UTC
  2. PowerBuilder
  3. # 2

Hi, Billy -

First, can you connect to your SQL Server database from the Server Management Studio (SMSS)? I assume you can since you included a partial screen shot of the SQL Server properties window. Version 15 of SQL Server is commonly referred to as SQL Server 2019.

If you don't have SMSS working already, I suggest you start there and get that operational first. I'm sure there are several helpful web sites and tips on the internet. Once that is working, then concentrate on getting a Database Profile set up in PowerBuilder.

Here are the settings I use to connect to the AdventureWorksLT2019 database that runs on a local instance of SQL Server Express 2019 on my home PC from PowerBuilder:

SQLCA.DBMS = "MSO"
SQLCA.ServerName = "*WorkStationNameHere*\SQLEXPRESS2019"
SQLCA.AutoCommit = False
SQLCA.DBParm = "Database='AdventureWorksLT2019',TrustedConnection=1,TrimSpaces=1,DateFormat='mm/dd/yyyy',DateTimeFormat='mm/dd/yyyy hh:mm:ss',TimeFormat='hh:mm:ss'"

Depending on which version of PowerBuilder you are using (you neglected to state this important piece of information in your question), you may not be able to use the MSO (MSOLEDBSQL) database driver.

Substitute the name of the server where SQL Server is running for "WorkStationNameHere". The instance name of "\SQLEXPRESS2019" may be different for you, also.

Substitute the database name for 'AdventureWorksLT2019 in the DBParm property with your database's name.

On my home system (and at work), I use Windows Authentication (my Windows login credentials) to connect to SQL Server instead of setting up a SQL Server login and user... That is what TrustedConnection=1 specifies. That simplifies the connection steps, but that setting may not be workable for your situation.

The other DBParm settings (TrimSpace, DateFormat, DateTimeFormat, and TimeFormat) are what I typically use in PB apps, but you can use other values based on your needs. There are a myriad of other possible DBParm settings that are valid for the MSO driver for SQL Server.

The following URL takes you to the online documentation for all of the DBParm settings (for all databases, not just SQL Server):

    https://docs.appeon.com/pb2022r2/connection_reference/Database_Parameters.html

The next URL is the online documentation for using SQL Server Native Database Interfaces, such as MSO.

    https://docs.appeon.com/pb2022r2/connecting_to_your_database/Using_Microsoft_SQL_Server.html

Best regards, John

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 12 December 2023 00:33 AM UTC
  2. PowerBuilder
  3. # 3

"...get errors connecting .."

Which errors when trying to connect how, with what parameters?

You have to be more specific if you want any answers, there's no magic here.

Comment
There are no comments made yet.
billy hugon Accepted Answer Pending Moderation
  1. Monday, 11 December 2023 18:08 PM UTC
  2. PowerBuilder
  3. # 4

Comment
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Monday, 11 December 2023 18:03 PM UTC
  2. PowerBuilder
  3. # 5

What version of SQL Server are you trying to connect to?

Regards,
Francisco

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.