[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

dwa

6/10/2004 8:43:00 PM

A general .NET releated design question:

Short Verssion:

What is the best way to have a data access layer target a different database
at run-time, without having to pass in some identifier or string to select a
database?

Background:

Many of our clients have very similar database processing requirements:
users, logins, products, product lines, etc., and we've been able to design
a generic database that works across a wide variety of business domains.
Along with this, we have data access components, of course. When we deploy,
we put a different instance of the database in place for each client, but
would like to re-use the same data access components for each application.

I thought about setting a variable in the AppDomain with SetData, which
could be referenced in the data access layer, but I'm not sure this will
work if the call into the access layer is remoted (?)

1. If we make a call into a remoted object, say on a different machine, does
that call run under the AppDomain of the caller? (my guess would be "no"
but...)

2. Is there some other context that we can use to determine the application
that is calling it?

Thanks,

- da


--