Solved

Powerbuilder Datawindow Locking Issue

Posted on 2006-07-10
6
1,822 Views
Last Modified: 2013-12-26
Greetings All,

Okay, it is easy to create a PB applications.  But now that I am rolling them out, they seem to hang with the hourglass.

In one instance I have two versions of the application running on the same odbc connection.  The first starts fine.  The second application hangs.  Is this to be expected?

Likewise, all of the users have a VB application that uses ODBC DSN 'number 1'  

The powerbuilder application that I am giving them accesses the same ODBC DSN 'number 1'

It seems to work.

Can someone offer some guidelines for managing the datawindows to avoid conflicts?  I don't want to roll out the application only to find that having a third user causes trouble.

The ODBC driver is a system dsn that accesses SQL Server via Named Pipes.  (they are already set up on every system).

Thanks!!

PEM
0
Comment
Question by:pemurray
6 Comments
 
LVL 5

Assisted Solution

by:michaelstoffel
michaelstoffel earned 166 total points
ID: 17083393
Make sure autocommit is set to TRUE on the transaction object and explicitly start and end your transactions.  You may be experiencing database locks.

Mike
0
 
LVL 4

Assisted Solution

by:Lordain
Lordain earned 166 total points
ID: 17087440
Is your database set up to allow a connection pool and are you using it?  Does each user have their own database account?
0
 

Author Comment

by:pemurray
ID: 17089814
Gentlemen,

I am not in the office right now so I will have to check the settings.  But the application uses a system odbc driver (as does the other application).  The odbc driver connects to SQL Server via Windows NT Authentication for each user.

Thanks!!

PEM
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:pemurray
ID: 17092470
Michael,

Your suggestion to turn autocommit to true and explicitly start and end the transactions seems to be at odds with the help (shown below):

SQLCA.AutoCommit = value

Parameter      Description value: Specifies whether PowerBuilder issues SQL statements outside or inside the scope of a transaction. Values are:

True  PowerBuilder issues SQL statements outside the scope of a transaction. The statements are not part of a logical unit of work (LUW). If the SQL statement is successful, the DBMS updates the database immediately as if a COMMIT statement had been issued.·

False  (Default) PowerBuilder issues SQL statements inside the scope of a transaction. PowerBuilder issues a BEGIN TRANSACTION statement at the start of the connection and issues another BEGIN TRANSACTION statement after each COMMIT or ROLLBACK statement is issued.

It seems like if I leave it as False, PB will handle the BEGIN, COMMIT or ROLLBACK for me.

What do you think?

To: Lordain,

There is a connection pooling tab on the odbc driver that has a default retry time of 120 for SQL Server.

Thanks!!

PEM
0
 

Author Comment

by:pemurray
ID: 17092502
More...

It seem pretty apparent that my application is causing the users of the other application that accesses the same database to get an SQL Runtime Error 40002.

I can see that I am not going to be able to run this application until I do some more research.  Of course the other program was written in VB and the developers probably thought they would have sole access to the database.  But still, it is a multi-user app and there were no runtime errors until I rolled out my application (which I pulled back).

Thanks!

PEM
0
 
LVL 4

Accepted Solution

by:
batchakamal earned 168 total points
ID: 17092944
Use SetTransPool function and make sure u use,

SQLCA.Lock = "Exclusive"

Bye
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question