Wednesday, March 7, 2012

limited number of connections to SQLMobile?

Using System.Data.SqlClient is there a limit to the number of connections an application can have to a SQLMobile dB?

If you have a look at the url below, it says "A device can only have a small number of connections to an instance of SQL Server at any time"

Does this mean 2, or 8 or what?
Should a app try to use only 1 connection throughout, or can we get away with 2-3?
Is this the same on WM5.0/PPP2003?

Any advice in this area much appreciated!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlce/htm/_lce_sqlclient_705.asp

p.s. I'm not interested in connection pooling!

Connections to SQL Mobile have little in common with connections to SQL Server. First, the managed provider for SQL Mobile is System.Data.SqlServerCe, which is a different creature than the SqlClient you refer to in your post (which is used to connect to an instance of SQL Server).

Yes, you can have multiple connections to a SQL Mobile database. System.Data.SqlServerCe does not support pooling or encryption of connection strings however.

I am not aware of a limit to the number of SqlCeConnections you can have open against a single SQL Moble database, but if there is one it is more than a dozen as I have done benchmarking with more than this.

Darren

No comments:

Post a Comment