|
-
Oct 4th, 2006, 01:31 AM
#1
Thread Starter
Hyperactive Member
[2005] Difference Between DataSets
What is difference between Typed and Untyped Datasets.
Thanks
Imran Ahmad Mughal
"Visual Studio .NET 2005/.NET Framework 2.0"
The eyes are the greatest telescopes, one will ever need to study the universe. Let the heart be the tripod, the mind be the shaft, then let the eyes become the lens of that great telescope of which God gave to us all.
-
Oct 4th, 2006, 01:41 AM
#2
Re: [2005] Difference Between DataSets
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.
-
Oct 4th, 2006, 01:47 AM
#3
Thread Starter
Hyperactive Member
Re: [2005] Difference Between DataSets
 Originally Posted by jmcilhinney
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!
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
"Visual Studio .NET 2005/.NET Framework 2.0"
The eyes are the greatest telescopes, one will ever need to study the universe. Let the heart be the tripod, the mind be the shaft, then let the eyes become the lens of that great telescope of which God gave to us all.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|