Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Jan 16, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Solving problems with Distributed PB Apps

I had some problems with distributed applications. I developed a DPB project (both the server and the client). The server has a NVO that connects to a database and retrieves information. It works great but when I want to make more than one client connection at the same time, it causes problems. My server application crashes and sends the next message to the clients connected. "Error 55 Request terminated abnormally". To focus the problem, I disabled the code that makes the connection to the database in the server and the problems disappears. That means that the object connection is not the problem. The problem is when i call the function from the remote NVO that makes the connection to a database. The technique that i use is using an instance variable SQLCB (transaction type) in my NVO. So I make the connection in that function (one for each client because it's an instance varible ).

Maybe that technique is not working. Another solution that i read in Masters of Powerbuilder book is using a global SQLCA in the server and use the dbhandle function to know if the connection is established or not (One connection for all the clients).

I try it too but i have the same results. Please help me. I'm gonna appreciate that.

You do not specify your DBMS so i'm going to tell you about two problems that I know about that could be causing the problems you describe. First of all if you are using Oracle and you are using SQLNet V2.2.x, you will need to upgrade to SQLNet V2.3 as there is a bug in that version that causes an error when you use Distributed PB. Second try making a connection to the DB from your dummy server window beore you start the server listening. This will add one database connection to the transaction pool and it seems to stabilize the pool and stop problems with the database connections. One last note is that you should not use SQLCA in your application server objects. If you ever want to use the same object in a transaction server such as MTS or Jaguar then you will run in to problems as SQLCA does not exist in those environments. Actually you cannot use a single global variable so that also rules out PFC!

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date