By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

Typed vs untyped datasets

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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 programmatically, 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%****************@TK2MSFTNGP03.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 discussion thread is closed

Replies have been disabled for this discussion.