1. Yasir Masood
  2. PowerBuilder
  3. Tuesday, 11 June 2024 16:35 PM UTC

Good morning,

I am trying to connect to an Azure DB (SQL 2014), using PB 2022 R3 Build 3356. I have tried both "SNC SQL Native Client(OLE DB)"

and "MSOLEDBSQL SQL Server" DB drivers, but I get the following error on both.

SQLSTATE = 08001
Microsoft SQL Server Native Client 11.0
Named Pipes Provider: Could not open a connection to SQL Server [53].

SQLSTATE = 08001
Microsoft OLE DB Driver for SQL Server
Named Pipes Provider: Could not open a connection to SQL Server [53].

I am adding the two INI files

[database]
DBMS = "MSOLEDBSQL SQL Server"
DBParm="PROVIDER='MSOLEDBSQL19',DATASOURCE='8efd10b79928.database.windows.net',PROVIDERSTRING='database=MY_TEST',
TrustedConnection=1,CommitOnDisconnect='No',PBTrimCharColumns='YES',INTEGRATEDSECURITY=',TrustedConnection=1
LogId=abc@rac.com
LogPassword=
ServerName=8efd10b79928.database.windows.net
Database=MY_TEST
UserId=
DatabasePassword=
;Lock=RL
Lock=RC
StayConnected=1
DBParm=StaticBind=0
AutoCommit=0

 

[database]
DBMS = "SNC SQL Native Client(OLE DB)"
DBParm="PROVIDER='SQLNCLI11',DATASOURCE='8efd10b79928.database.windows.net',PROVIDERSTRING='database=MY_TEST',
TrustedConnection=1,CommitOnDisconnect='No',PBTrimCharColumns='YES',INTEGRATEDSECURITY=',TrustedConnection=1
LogId=yasirm@railtrac.com
LogPassword=
ServerName=8efd10b79928.database.windows.net
Database=MY_TEST
UserId=
DatabasePassword=
;Lock=RL
Lock=RC
StayConnected=1
DBParm=StaticBind=0
AutoCommit=0

I would appreciate any help.

Thanks

 

 

Yasir Masood Accepted Answer Pending Moderation
  1. Friday, 14 June 2024 13:02 PM UTC
  2. PowerBuilder
  3. # 1

Good morning,

Here is a list of DLL's that I have included in the same directory as the exe.

 

Attachments (1)
Comment
There are no comments made yet.
Yasir Masood Accepted Answer Pending Moderation
  1. Thursday, 13 June 2024 01:36 AM UTC
  2. PowerBuilder
  3. # 2

I am getting this error now.

Even though the DBA has installed the latest driver on a 2019 Server.

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 13 June 2024 15:15 PM UTC
I am not an Azure expert, so I cannot comment on Azure's bitness restrictions.

If Azure does not support 32 bitness (that seems weird to me) then you have two choices:

A) Compile your Apps into 64 bit mode or

B) use a different SS DB Client (ie: ODBC).

  1. Helpful
  1. Yasir Masood
  2. Friday, 14 June 2024 01:10 AM UTC
I created a 64 bit version. Now, I am getting a different error



"There is currently no matching version, Lowest Supported Version: 22.2.0.3356"
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 14 June 2024 02:18 AM UTC
You are now probably missing the PB 64 bit runtime deployment files.
  1. Helpful 1
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 18:12 PM UTC
  2. PowerBuilder
  3. # 3

did you open the azure sql firewall to allow your external ip address to connect?  Or do you have a VPN to the azure network that it is on?

 

"Named Pipes Provider: Could not open a connection to SQL Server [53]."

turn off named pipes in your sql server client setup .  make sure tcp/ip is on.  

 

 

Comment
  1. Yasir Masood
  2. Tuesday, 11 June 2024 18:16 PM UTC
How can I turn off named pipes in PB or the INI file? How do I turn tcp/ip on?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 11 June 2024 18:09 PM UTC
  2. PowerBuilder
  3. # 4

Hi Yasir;

  The 08001 error is typically ... "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections"

Regards .. Chris

Comment
  1. Yasir Masood
  2. Tuesday, 11 June 2024 18:17 PM UTC
Chris,

I am able to connect using SSMS, but not through the DB Profile or using an INI file.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 11 June 2024 18:35 PM UTC
That is because PB only uses TCP/IP. So as Mike suggests ... make sure TCP/IP is ON at the SS configuration setting level and then make sure that that IP / Port is open on the Azure firewall. HTH
  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.