PC Review


Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average.

what is meant by typed/untyped/strongly typed datasets?

 
 
Rachana
Guest
Posts: n/a
 
      14th Nov 2007
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

 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      14th Nov 2007
"Rachana" <(E-Mail Removed)> schrieb
> 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
>



http://msdn2.microsoft.com/en-us/library/esbykkzb(VS.80).aspx


Armin
 
Reply With Quote
 
 
 
 
Phillip Taylor
Guest
Posts: n/a
 
      14th Nov 2007
On Nov 14, 3:08 pm, "Armin Zingler" <az.nos...@freenet.de> wrote:
> "Rachana" <mbs.rach...@gmail.com> schrieb
>
> > 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

>
> http://msdn2.microsoft.com/en-us/library/esbykkzb(VS.80).aspx
>
> Armin


If something is strongly typed then it means you have explicitly told
the computer what kind of data you are working with. With untyped or
weakly typed languages or datasets, the system attempts to have a
guess.

For example. C# is strongly typed:

Int32 myvariable = 6; //myvariable is a number.
myvariable = "hello"; //error, you can't put a string in a number

however PHP is not:

$myvariable = 6; //myvariable is a number
$myvariable = "hello"; //myvariable is all of a sudden a string

The same thing applies to datasets with database programming. You can
apply the databases structure rigidly to your code or not.

 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      14th Nov 2007
Rachana,

One of the features from a dataset is that you can describe it in an XSD
file.

Visual Studio gives you a lot of possibilities to do that. As soon as you
have that XSD file you can make a class from it, that inherits the original
DataSet.

The trouble with the none strongly typed dataset is that you have yourself
to index all the tables, the columns and the items by integers, strings (and
columns for the items)

An object instanced from a Strongly Typed Dataset makes life much easier for
you.

Using a Row in a dataset means that you do
Dim myRow as DataRow = ds.Tables(0).NewRow

In a Strongly Typed dataset you do
Dim myRow as MyStronglyTypedDataset.NewMyTableRow

An item is then by instance in a non strongly typed dataset

myRow("ID")

in a strongly typed dataset it is
myRow.ID

This is much saver because the non strongly datasets give only errors on
runtime as you type something wrong. The strongly typed dataset does that at
design time.

Beside that are there properties around relations, and by instance is
nothing, and all with intelligence so you don't have to look all the time
what items you have to use and how to write them.

The trouble is with a strongly typed dataset is to get used to the names
that is generated from the XSD description for you (of course using the kind
of logic from the guys who made this class).

However as you are used to it you never want to use a non strongly dataset
anymore.

(This is all written in this message, normaly I use intelligence to get the
names, so I can have used some wrong)

Cor

 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      14th Nov 2007
I forgot to tell what Philip was telling however with C# samples.

The type gives that you don't have to cast the objects. In a non strongly
typed dataset everything is an object and therefore you are all the time
casting to the correct type.

However that is not the most important why I like it, because casting to the
receiver is easily done.

However this is of course done in advance for you in a Strongly Typed
Dataset.

Cor

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
People receiving email that was not meant for them? Microsoft Outlook 1 18th Sep 2004 11:56 PM
Recalling an E-mail not meant to go out Cassady Microsoft Outlook 5 11th Jul 2004 07:05 AM
I meant 4 messages before yours. Murray Windows XP General 1 15th Apr 2004 06:54 PM
Not meant to be vulgar Larry Windows XP General 4 29th Nov 2003 05:11 PM
Not what I meant Val Windows XP Performance 2 18th Nov 2003 08:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:50 AM.