views:

1253

answers:

5

How to make database connection pool in PowerBuilder (v9+) with...

  • ...ODBC?
  • ...SQL Server?
  • ...Oracle?
+2  A: 

Unfortunately, at least with PB 9, you can't natively. PB has always been a two-tier dev tool. However, if you are using the WebServices support that started in PB 9 you can get around this limitation by invoking WebServices on a connection pooled appServer. I haven't played with PB 11.5 yet BTW. Could be different there.

Jason

A: 

@Jason Vogel...

You said I can't do natively ...so there is an alternative way to do it?

Daniel Silveira
+2  A: 

At this risk of self-promotion, these may get you started for Oracle:

http://tinyurl.com/3zkus6

http://tinyurl.com/4y3z87

If you go to http://sybooks.sybase.com (intuitive, eh? ), go to the Connecting to Your Database manual for the version you're looking at, a search for "pool" may be productive. Looking at my local copy for 11.5, I can see references to SNC (MS) and ODBC.

As far as "non-native" approaches, I'm guessing Jason might have been referring to connection pooling with an application server, then getting your data through that.

Good luck.

Terry
+1  A: 

With PowerBuilder version 9 and up using the Oracle native driver and connecting to Oracle 9i and above databases, you can tell Oracle to maintain connections in a pool using the CnnPool='Yes' database parameter:

Additional info from the PB 11.1 docs: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc33820_1110/html/dbparm/BJEBJADI.htm

Dougman
+1  A: 

I don't believe that

CnnPool='Yes'

was supported officially in PB 9.

I'm not sure that most PB developers are all that familiar with how to deal with pools.

ASP.Net's approach is simple and straight forward at least compared to my experience with some Java app servers. (Please don't start a flame war on that last sentence, I said my experience).

I have written a "server" application that received PB datastores that were executed for ds.retrieve() and ds.update() and passed the data back to the client PB app. It was a way to pool. The server application would open multiple connections... I did this in PB 8 (there's a book out there somewhere). I wouldn't recomment this approach... lot's of code.

In PB 11.x, there are some cool new approaches that you should consider.