Dataset Declaration?

  • Thread starter Thread starter al
  • Start date Start date
A

al

Hi,

What is the difference between the two statement declarations please:

Dim ds1 as New dataSet

Dim ds2 as New DataSet("MyDataSet")




MTIA,
Grawsha
 
The difference is that if you don't pass the "MyDataSet"
string, the dataset's DataSetName property is defaulted
to "NewDataSet".

I've never used the dataset's DataSetName property, but I
imagine it could come in handy if you have a generic
method needs to identify the dataset that receives as a
parameter.

Hector
 
Unless you are planning on serializing it to XML, there's no real
difference. However, if you serialize it via WriteXML and you want your
root named something in particular, then you have to use the constructor
with a String argument.

HTH,

Bill
 
Back
Top