Ideal Ordeal? Deal.

to break is human; to fix is also human

Posts Tagged ‘TableAdapter’

Ordeal: Strongly Typed DataSet Connection String

Posted by Raj Kashyap on Wednesday, December 9, 2009

When designing Strongly Typed DataSets, Visual Studio’s designer wants you to specify a database Connection String, which is then shared by all TableAdapters for database connectivity. The connection string gets stored as a read-only property in the Application Settings configuration. You cannot change it at run-time if you want to connect to a different data source. In the real-world, even the simplest application needs to connect to different data sources – development, test and production. While we certainly need the RAD and IntelliSense benefits of using strongly typed datasets during development, we also need the ability to change the connection at run-time, whenever we need to. Here we shall see how to work around this inadequacy. This is Ideal Ordeal. more…


Posted in Programming | Tagged: , , , , , | 14 Comments »