Neven Draskovic

Neven Draskovic

  • NA
  • 117
  • 138.3k

Switching between databases in Windows forms

Mar 1 2012 5:46 AM
Hey
I made an application that generates reports based on data from a database. The functionality of my application is correct, but I have a following problem: my client has 2 identical databases - one for testing and one for actual work he does. My application should work with both databases (it should have a "switching mechanism"), but I don't know how to implement it. I know that I could just switch between connection strings but the problem is that in my reports I use datasets that are bound to one database. Is it possible to fill those datasets with the data from both databases (since the databases are identical in schema, it should be possible), and how would that be done, or do I have to use duplicate dataset/report pairs?
I'm using C# in VS 2010 with SQL Server 2005, and .rdlc for my reports.
Thanks.

Answers (3)