views:

308

answers:

1

When using Castle ActiveRecord, is it possible to determine during runtime which connection string to use?

As I understand it, ActiveRecord has to be initialized only once during the application's lifetime and this means that database connection strings have to be configured prior to initialization.

However, is it still possible to determine connection strings during run time - i.e. what if the web app does not know which database to use until after the user has logged in?

A: 

Check out DifferentDatabaseScope

Mauricio Scheffer
ActiveRecord FAQ: http://using.castleproject.org/display/AR/FAQ
Mauricio Scheffer