1. Louis Arena
  2. PowerServer
  3. Thursday, 13 October 2022 12:57 PM UTC

I am currently converting my application to PowerServer, I am using PB 2022.  When I make the first connection using MSOLEDBSQL SQL Server drivers I have no issues.  But I use multiple transactions in my application.  When I try and connect with my other transactions I get the following error.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

My issue is that I do not use named pipes, all of my connections are via TCP only.  So what is the trick?  I sure hope it's not to use Named Pipes.

Thanks

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 13 October 2022 16:19 PM UTC
  2. PowerServer
  3. # 1

The database connection mechanism of PowerServer is completely different from client/server.  So for troubleshooting PowerSErver it is irrelevant that client/sever works correctly.

If you have multiple transaction objects you will need to configure multiple connection cache and mappings in the Web API tab of the project object.

Configuring connection cache: https://docs.appeon.com/ps2022/Configure_the_database_connection_in_the_Database_Configuration_dialog.html

Mapping transaction objects: https://docs.appeon.com/ps2022/Dynamically_mapping_transaction_object_with_cache.html

As far as the connection issue, I don't think that is related to multiple transaction objects.  I think your SQL Server has not been configured correctly.  Please follow the documentation: https://docs.appeon.com/ps2022/Configuring_in_PowerBuilder_IDE_for_project_compilation.html#Creating_a_cache_for_SQLServer

Comment
  1. Louis Arena
  2. Thursday, 13 October 2022 18:04 PM UTC
Thanks, I was just reading up on the 2 links you sent when you replied. Weird that you have to define each transaction independently but I also had to add a second database connection because I have a separate transaction that connects to a different database.



Thanks for the help. The SQL server was setup correctly for what I needed.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 13 October 2022 18:09 PM UTC
You're very welcome. So it is working now?
  1. Helpful
There are no comments made yet.
Louis Arena Accepted Answer Pending Moderation
  1. Thursday, 13 October 2022 13:01 PM UTC
  2. PowerServer
  3. # 2

Sorry I should add this works perfectly when running the application outside of PowerServer.

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.