Find the size of a DataSet

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

Hello,

Is it possible to find the size of a populated DataSet?

I have an application (VB.Net) that that populates a DataSet and then
sends that DataSet to a PDA.
The application on the PDA then uses that DataSet.
The size of the DataSet makes quite a bit of difference to the transfer
time and the response of the PDA application so I would like some way
to determine the DataSet size for some benchmarks.

It would be great to be able to pop up a warning message before
the transfer to the PDA if the user has selected too much data.
Thanks,

Matt
 
Matt,

I think that it is important how you transport the dataset when it is as XML
dataset than it is of course just one of the properties as result from the
fileinfo class.

However just a gues

Cor
 
Hi Cor,

Of course! I am in fact turning it into an XML file in order to send it
to the PDA, I didn't mention that bit because I did not want to bore
people with the details.

I expect I shall use your idea of the FileInfo class.
I was just wondering if there was a way to do it without writing the
file to disk first as it would save on processing.

Thanks,

Matt
 
Matt,

I was assuming you was writing it as file already, when not than maybe you
can just serialize it as string than you have the "almost" length.

\\\
Dim sw As New System.IO.StringWriter
ds.WriteXml(sw)
Dim mystring As String = sw.tostring
///
I hope this helps?

Cor
 
Back
Top