473,748 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Typed vs untyped datasets

I've always used untyped datasets. In a Microsoft course, it walks through
creating typed datasets and harps on the benefits. It has you drag all
these things around ..wizard, wizard, wizard... code gen, code gen, code
gen.

What's at the end looks slick, but then there's a ton of generated code that
I'm going to have to maintain now.

I.e. I like typing things myself (don't like wizards) so I can know exactly
what I've done.

What's the thought on using typed vs untyped datasets? Am I just being
prehistoric and need to get with it?

Thanks,
Ron
Oct 12 '06 #1
4 9922
Jay

Ronald S. Cook wrote:
I've always used untyped datasets. In a Microsoft course, it walks through
creating typed datasets and harps on the benefits. It has you drag all
these things around ..wizard, wizard, wizard... code gen, code gen, code
gen.

What's at the end looks slick, but then there's a ton of generated code that
I'm going to have to maintain now.

I.e. I like typing things myself (don't like wizards) so I can know exactly
what I've done.

What's the thought on using typed vs untyped datasets? Am I just being
prehistoric and need to get with it?

Thanks,
Ron

Ronald,

There's plenty of discussion on the subject (perhaps my favorite:
http://msdn.microsoft.com/library/de...ml/BOAGag.asp).

You could also create a typed DataSet by hand (without the designer).

-Jay

Oct 12 '06 #2
Hello Ron,

We've been working on a client server project for close to 4 years now.
It's a medical application that's written in c# .NET 1.1. We made the
decision to go with typed datasets early on. However, we also like to
type our own code to have more control of what's going on so we
basically made our own typed datasets by hand.

Let me just say that I STRONGLY suggest using typed datasets. It has
made things much simpler and easier to program against. So let me take
a step back and try and explain the benefits. I would say the biggest
benefit is to be able to speed up the coding process and eliminate
runntime errors. It's really the combination of those two items (not
one or the other) that make the decision a no brainer. A byproduct is
the fact that you then follow better coding standards and practices
since you can "template" out your approach on every piece of data in
your system. In fact, we make all of our typed datatables and datarows
derive from a custom abstact class which in turn derives from DataTable
and DataRow respectively. This allows us to put things such as
debugging methods directly into the base classes.

Microsoft really intended for the GUI stuff that Visual Studio supports
to have very little to do with WHY one would choose to use typed
datasets. In other words, typed datasets are a great consept to adhere
to so Microsoft made a wizard to expediate the process.

Dave

On Oct 12, 10:40 am, "Ronald S. Cook" <r...@westinis. comwrote:
I've always used untyped datasets. In a Microsoft course, it walks through
creating typed datasets and harps on the benefits. It has you drag all
these things around ..wizard, wizard, wizard... code gen, code gen, code
gen.

What's at the end looks slick, but then there's a ton of generated code that
I'm going to have to maintain now.

I.e. I like typing things myself (don't like wizards) so I can know exactly
what I've done.

What's the thought on using typed vs untyped datasets? Am I just being
prehistoric and need to get with it?

Thanks,
Ron
Oct 12 '06 #3
Ronald S. Cook wrote:
What's the thought on using typed vs untyped datasets? Am I just being
prehistoric and need to get with it?
If you want to build a very robust system that can be
maintained for 10+ years then you should go the type safe
route meaning either a typed data set or a type safe collection
of data objects. I prefer the last, but different people
means different opinions.

If you are doing a one time database conversion, then
do whatever you prefer to get the job as fast as possible.

But since code in general tend to live much longer than
original intended, then you should usually prefer a
type safe solution.

Arne
Oct 13 '06 #4

Typed DataSets are always preferred over non typed ones in my experience.

The "typed" parts also relates to ... in the background..... .creates a real
class, so you can get to the data within the DataSet programmaticall y, and
in a type safe manner.

And a reference to read from start to finish, aka, very informative for a
bird's eye view:
*
http://msdn.microsoft.com/library/de...tml/BOAGag.asp
Id read that start to finish.
Here is a section of emphasis.
Deploying Business Entities
Business entities are used at many different tiers in your application.
Depending on how you implement your business entities, you may need to
deploy them to multiple locations if your application spans physical tiers.
The following list describes how to deploy business entities in different
implementation scenarios:

a.. Deploying Business Entities implemented as typed DataSets. The typed
DataSet class must be accessed by the Data Access Logic Component and by the
calling application. Therefore, the recommendation is to define typed
DataSet classes in a common assembly to be deployed on multiple tiers.
While typed datasets are good, sometimes there is a "better".
Custom Objects and Custom Object Collections are sometimes the next step.
I sometimes refer to typed datasets as the "poor man's business object".
Keep in mind I still use and prefer typed datasets on occasion. It depends
on what kind of project you're working on.

Go here:
http://sholliday.spaces.live.com/?_c...26ayear%3d2006
Download the code, and you'll see an example of a typed dataset vs a custom
object.
But to your question, I'd always go with a typed dataset over a non typed
one.
The previous poster who illuded to that the small price you pay up front,
pays off big time later, with maintenance and figuring out what is wrong.

...


"Ronald S. Cook" <rc***@westinis .comwrote in message
news:e%******** ********@TK2MSF TNGP03.phx.gbl. ..
I've always used untyped datasets. In a Microsoft course, it walks
through
creating typed datasets and harps on the benefits. It has you drag all
these things around ..wizard, wizard, wizard... code gen, code gen, code
gen.

What's at the end looks slick, but then there's a ton of generated code
that
I'm going to have to maintain now.

I.e. I like typing things myself (don't like wizards) so I can know
exactly
what I've done.

What's the thought on using typed vs untyped datasets? Am I just being
prehistoric and need to get with it?

Thanks,
Ron


Oct 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1357
by: Fresh Air Rider | last post by:
Could anyone please provide a code snippet demonstrating how to use the Repeater control in conjunction with the PagedDataSource class and a Strongly Typed Dataset ? I get an error informing me that my datasource does not implement ICollection. All examples of using the PagedDataSource class with the Repeater seem use untyped datasets.
1
6088
by: Job Lot | last post by:
I am confused how strongly typed dataset is different from un-typed dataset. Is there any good link explaining pros and cons of both? Which one should be used preferably?
5
7470
by: DraguVaso | last post by:
Hi, Something I don't understand about a Typed DataSet: When a value in the DataSet is DBNull, it throws this error: "Cannot get value because it is DBNull". But aren't Typed DataSets invented to make life easier, to be able to get to tge Tables and Values with less code, in less time? But with this thing you need to add a Try-Catch around every statement when using the value, add for each value a default value in your DataSet (and...
1
2689
by: Fresh Air Rider | last post by:
Hi Fellow Dotnetters Could anyone please provide a code snippet demonstrating how to use the Repeater control in conjunction with the PagedDataSource class and a Strongly Typed Dataset ? I get an error informing me that my datasource does not implement ICollection. All examples of using the PagedDataSource class with the Repeater seem
2
5086
by: thomson | last post by:
Hi All, What is the difference between a typed dataset and an untyped datset, Where can be this used actually, I mean in which situation which has to be used, In case anyone has got some articles please let me know Thanks in Advance Regards
0
1329
by: vrushalik | last post by:
Hi, i want to know pros and cons of both Typed and Untyped dataset in detail. can we customize untyped dataset? What is benefit of Typed dataset? is there significant difference between performance of Typed and untyped dataset?
1
4797
by: zlf | last post by:
Hello As a known issue, WCF does not allow to transfer typed DataSet. So I have to copy all data from typed DataSet to untyped DataSet(same table names, column names and row data). What is the most efficient way to do that? I tried to remove DataTable from typed one then add to untyped one, but I tell me it is forbidden to remove tables from typed DataSet. Thanks zlf
0
1179
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their comparisions) cleared? Thanks, Rachana
4
3111
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their comparisions) cleared? Thanks, Rachana
0
8983
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.