sethindeed Posted February 12, 2003 Posted February 12, 2003 Following one of my previous question, is it possible to modify the connectionstring of a dataadapter at runtime. What I want to do is to connect to a different database using the same dataadapter Many thanx ! Quote What I don't know keeps me excited...
Leaders quwiltw Posted February 12, 2003 Leaders Posted February 12, 2003 Dataadapters don't have connection strings but you can modify the connection string of a connection object at runtime. You can point the dataadapter whereever you want as far as I know, though for whatever reason I've never had a use-case for connecting one to two different data sources. Quote --tim
sethindeed Posted February 13, 2003 Author Posted February 13, 2003 Thanx BTW, is it just me or with the dataadapter and the datareader, I can do prettu much all the operations I need. I mean, all the books I read pointed to the dataset object but I finally ended without using it. Dataset is useful only when you want to store multiple tables or what ? Quote What I don't know keeps me excited...
*Gurus* Derek Stone Posted February 13, 2003 *Gurus* Posted February 13, 2003 A DataSet can include multiple tables, as you mentioned, along with relations and key constraints, which are very useful if your database is correctly normalized. DataSets are also incredibly easy to pass between your application's different tiers, from function to function or across a serialized stream. DataReaders are limited to groupings of rows, either from a single table or two or more tables being joined together, and can't be passed around as a DataSet can be. Both the DataSet and the DataReader have their purposes, however the DataSet is used quite a bit more throughout the majority of .NET examples and documentation, primarily since it binds so easily with the DataGrid control. My advice? Use the one that does what you need it to. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.