What is difference between Typed and Untyped Datasets.
Thanks
Imran Ahmad Mughal
Printable View
What is difference between Typed and Untyped Datasets.
Thanks
Imran Ahmad Mughal
Untyped DataSets contain generic DataTables that contain generic DataRows. To get a field value for a row you have to specify it by column index or name using a string. You get no help from Intellisense and if you mis-spell a column name your app will most likely crash.
A typed DataSet contains tables and rows where each is a separate class, with properties that correspond to each column. You access a field value as a property of a typed row object, just like you access any normal property of any normal object. You get Intellisense and the compiler will ensure that all your code is valid so no run time exceptions will occur. A typed DataSet also includes TableAdapters, which are like DataAdapters but generated with methods specifically designed to make working with their corresponding table easier.
Thanks for replying!Quote:
Originally Posted by jmcilhinney
You have seen in .NET 2003 that whenever we fill the dataset using adapter object we use the statement like this
VB Code:
customerTableAdapter.fill(datasetName, tableName)
As in this case we have provided the dataset Name and table Name explicitly but when we are in .Net 2005 we use the statement like this,
VB Code:
customerTableAdapter(datasetName.tableName)
Why we did not give the dataset name and table name separately as in case of .Net 2003.
Is there a type or untyped difference of datasets.
Thanks
Imran Ahmad Mughal