Powerbuilder Datawindow Locking Issue

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
pemurrayAsked:
Who is Participating?
 
batchakamalConnect With a Mentor Commented:
Use SetTransPool function and make sure u use,

SQLCA.Lock = "Exclusive"

Bye
0
 
michaelstoffelConnect With a Mentor Commented:
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
 
LordainConnect With a Mentor Commented:
Is your database set up to allow a connection pool and are you using it?  Does each user have their own database account?
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
pemurrayAuthor Commented:
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
 
pemurrayAuthor Commented:
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
 
pemurrayAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.