PC Review


Reply
Thread Tools Rate Thread

Dataset Name

 
 
Vayse
Guest
Posts: n/a
 
      9th Dec 2005
From the help
Dim dataSet As DataSet = New DataSet("Suppliers")

Why name the dataset? Why not just use
Dim dataSet As DataSet = New DataSet()

Thanks
Vayse


 
Reply With Quote
 
 
 
 
=?Utf-8?B?RWx0b24gVw==?=
Guest
Posts: n/a
 
      9th Dec 2005
Yes.

It gives default DataSetName, NewDataSet.

Elton Wang

"Vayse" wrote:

> From the help
> Dim dataSet As DataSet = New DataSet("Suppliers")
>
> Why name the dataset? Why not just use
> Dim dataSet As DataSet = New DataSet()
>
> Thanks
> Vayse
>
>
>

 
Reply With Quote
 
W.G. Ryan - MVP
Guest
Posts: n/a
 
      9th Dec 2005
For the same reason you name a DataBase. It lets you identify what you're
working with essentially. this may not be important in some cases but there
certainly are times when it is.

protected void UpdateDataSet(DataSet ds){

switch(ds.DataSetName){
case "Customers":
CustomersdataAdatper.Update(ds);
break;
case "Employees":
EmployeesAdatper.Update(ds);
break;
}

}
"Vayse" <(E-Mail Removed)> wrote in message
news:%23PDY22N$(E-Mail Removed)...
> From the help
> Dim dataSet As DataSet = New DataSet("Suppliers")
>
> Why name the dataset? Why not just use
> Dim dataSet As DataSet = New DataSet()
>
> Thanks
> Vayse
>



 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      10th Dec 2005
Vayse,

Why not use

> From the help
> Dim dataSet As DataSet = New DataSet("Suppliers")
>
> Why name the dataset? Why not just use
> Dim dataSet As DataSet = New DataSet()
>

Dim myDataSet As New DataSet()

This is a (very) small advantage from VBNet above C#

Be aware that using the posibilitie of low and upercases is not language
compliant in Net for public/friend variables which DataSets often are.

http://msdn2.microsoft.com/en-us/library/730f1wy3.aspx

I hope this helps,

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
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 06:26 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 7 9th Dec 2003 02:50 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 2 31st Oct 2003 01:05 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 02:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:00 AM.