Hi all
I have 4 database hooked up working well in my project.
However I have a heap of identical databases that i need to connect to dynamically at runtime.
What is the easiest way to connect to each of these databases at runtime.
I have seen that i can create a new connection at run time using this. The genericConnection string holds the connection to this particular database i want.
ClinicConsoleV2ChildSite.Data.DataRepository.AddConnection("CustomChildsite", genericConnection);
However how do i tell ClinicConsoleV2ChildSite that i want its default connection to be CustomChildsite?
Or is the above line all that is needed to add and set it in one go. So now any transactions i make to ClinicConsoleV2ChildSite will now effect the CustomChildsite database.
Another thing is there a way to make the stored procedures global to all these identical databases or doi have to add them to 800+ databases? Urgh.
Cheers
Dominion.