sharing a database connection between applications in c# -


I was wondering if anyone knows whether it is possible to share multiple database identical database connections

< P> For example, if I have an application that opens a connection to a database, then I start another application that needs to be connected to the same database - so instead of opening 2 connections, I first used to connect to the app Use which are already open Opening a connection

Because I am asking because I am developing a system that is made up of a large one rather than a different exe - but they all use the same database < / P>

Any help would be appreciated

thanks

IMHO You can share the same connection string, but sharing the same physical DB connection between unknown apps about each The stem will not be good idea. How do you handle locking, concurrency, transaction limits etc.

If this is to reduce the DB licensing cost or limit the connection, then this low connection life time (i.e. the application connect

if you really want to share a connection , You can see your app split into a single back-end (like Windows or WCF service) that manages a singleton DB connection.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -