Question : Connect to SQL Server database dynamically with ASP.net

Hi Experts

I generally create my database connections by creating a strongly typed dataset using the dataset designer in Visual Studio. In this instance I have multiple databases with the same structure and so want to be able to create a single dataset that utilises this structure, but set the actual database that it connects to depending on a passed variable.

So if I call a function like:

oDataToProcess.AddtoDatabase("database name")

I want to be able to draw on the same dataset but apply it to the SQL Server database name passed in the command.

I am coding in VB.NET

many thanks

Stewart

Answer : Connect to SQL Server database dynamically with ASP.net

Random Solutions  
 
programming4us programming4us