Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Powerbuilder Datawindow Locking Issue

Posted on 2006-07-10
6
Medium Priority
?
1,971 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 664 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 664 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 672 total points
ID: 17092944
Use SetTransPool function and make sure u use,

SQLCA.Lock = "Exclusive"

Bye
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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 NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

876 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