Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I wrote a PowerBuilder framework that receives Winsock messages over the web and uses SharedObject multi-threading to process the messages. The framework demo uses MS Access and works great for me. My customer is using it with SQL Anywhere and reports all sorts of issues with it hanging up when multiple messages come in at the same time. Are there any tips on how to handle multiple simultaneous connections from the same process?

asked 02 Jan, 15:14

topwiz's gravatar image

accept rate: 0%

Can you expand on "hanging up". Is it PB or SQLA?

Are you using a single transaction object? In general, you may need to protect against the same connection executing operations at the same time. One way to approach this is instantiating the transaction object (you will need an object inherited from Transaction ) in the Winsock processing thread. The other is to use mutexes to prevent threads from stepping on each other. It has been a while but I don't think PB has native support for mutexes but implementing using the Windows API can be used.

(02 Jan, 20:31) Chris Keating

PowerBuilder multi-threading gives each thread its own set of global variables including sqlca. Each thread makes a separate connection to the database. The main thread does not connect to the database. Is there a limit to how many connections can be made with the same userid ?

(02 Jan, 20:41) topwiz

The personal server allows no more than 10 connections.

The default limit of concurrent connections for the network database server is equal to the maximum number of connections allowed by your per-seat license or 32766 connections if you have a per-core license. This can also be controlled by changing the default engine configuration i.e., max_connections option, login policies.

Note that if they are using a Developer Edition, there is a limit of 3 connections when installed. This can be changed with dblic command line utility as long as the usage aligns with the license agreement.

It would still be useful to understand what is meant by "hanging up".

(03 Jan, 09:01) Chris Keating
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 02 Jan, 15:14

question was seen: 299 times

last updated: 03 Jan, 09:01