Multiple databases across application
Moderator: General Moderators
Multiple databases across application
I'm working on a project that could very easily make sense to have multiple databases, due to the way it could logically be broken up. I'm wondering what the best way is to handle connection strings. I'm using a wrapper class that defines the connection string, I'm thinking I could add to that and create a function that just lists all the connection strings, then call that in my page after i initiate the class.. not sure if that's the best way.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
It's often pretty difficult to justify needing more than one database for an application. If the same connection combination (user/password/client/server) match then you just need to add the database name before the table name references to access the other databases. If they are separate servers you'll need separate connections and separate queries.