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…
Posts Tagged ‘Visual Studio’
Ordeal: Strongly Typed DataSet Connection String
Posted by Raj Kashyap on Wednesday, December 9, 2009
Posted in Programming | Tagged: .NET, Connection String, Strongly Typed DataSet, TableAdapter, TableAdapterManager, Visual Studio | 14 Comments »
