What is the number of maximum concurrent connections for Sql CE 3.5?

前端 未结 4 1582
甜味超标
甜味超标 2020-12-17 17:16

as google does not deliver what i want to know, i try to ask stackoverflow :) what is the number of max concurrent connections to a sql ce 3.5 database? thanks j.

4条回答
  •  爱一瞬间的悲伤
    2020-12-17 17:52

    I know that SQL CE 3.5 allows multiple concurrent connections from multiple processes (as opposed to earlier versions that allowed, but did not recommend, multiples from only one process). My guess is that it's resource limited, but I'm not certain. I actually have a call in to the SQLCE team directly to find out if there is a count limit on this (I'll post back when I get a reply, likely later today, though with PDC ongoing, it might be longer).

    That said, I question why you would need to know this. How many connections are you trying to make? You should have at least 2 - it's recommended to always maintain 1 connection, even if it's a dummy that's never used, to keep the connection cached for performance reasons - but I've never done any implementation that had more than maybe 4 or 5 at any given time. If you have more than that, you might need to rethink your architecture, or the app is more likely a candidate for a full-blown server product.

    Update

    I finally heard back from the team and they confirmed from the source code that the number is 256. This is what they said:

    "...since we are implementing it in C/C++, the counter starts from 0 and ends in 255. These are the number of parallel connections and not total connections. For every open, the counter goes up by 1 and for every close it goes down by 1. If you have not closed, but just unreferenced close happens on Dispose."

提交回复
热议问题