Enable pooling in CF?

  • Thread starter Thread starter enantiomer
  • Start date Start date
E

enantiomer

Is there a way to enable connection pooling in the CF? The delay for
opening each connection is about 1-2 seconds currently. Quite a
performance hit indeed. I had read that connection pooling was
disabled in the CF, and was looking for ways in which to enable it. I
checked out this article

http://www.dineshpriyankara.com/CAAA0001.aspx

which says you can set the "Pooling" parameter to true in order to
enable pooling. When i try that through the CF, it gives the exception
of "Unknown connection option in connection string: pooling."

Is there a way to do this? Since I open quite a few connections
through my heirarchical service calls, it is really taking a long time
to get my business data! Any tips?

Jonathan
 
I forgot to mention that I am connecting the device to a sql server
2000 database. So I am using the SqlConnection object if it makes any
difference. If there is no way to enable pooling, what other options
do I have other than just keeping the connection open? I utilize a
stateless service based architecture, so keeping open connections isn't
ideal. I suppose I could implement my own custom connection pooling.
What a pain! Thanks for any tips, hints, or ideas,

Jonathan
 
With the .NET Compact Framework, there is no connection pooling support
in either the SqlClient or the managed provider for SQL Mobile.

You should open a connection, do your business with SQL Server, and close it
when using the SqlClient. Mobile devices frequently drop connections to
servers
and counting on a connection kept open is risky - always check the
connection
state of any connection you intend to use (or have cached) before using it.

If you need asynchronous operations against your server-side database, you
might consider using a web services approach instead.
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
Back
Top