Establishing a connection is quite expensive. Depending on your needs, you could:
- Host the middle and data tier COM components as a COM+ application. The connection will be pooled among several users.
- Instantiate the COM components and leave them running. The connection will be made and then stay open during the entire application.
>When doing n-tier development how do you guys handle the connection to the database?
>
>Let's say my app is connecting to database on server A and the business logic tier is in server B.
>
>Before in the client server world each workstation would run the EXE and establish 1 connection and use this connection thru the life of the application.
>
>Now in the n-tier world the connection is being established at the business logic layer? Does that mean that's it's going to be opening and closing connections with each request?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer