none
Get Dataset size

    Question

  • hi
    iam connectiong to a webservice and i get the database in a dataset is there a code to see what is the size of that dataset in KB and once i begin download how much size is being downloaded
    thanx a lot
    Tuesday, February 17, 2009 5:47 PM

Answers

  • Hi Sami Karaeen,

    You can use code below  to get dataset size in KB.

    Imports System.Runtime.Serialization.Formatters.Binary  
    Imports System.IO  
     
     Dim ms As New MemoryStream()  
     Dim f As New BinaryFormatter()  
     
     f.Serialize(ms, EmployeeDataSet)  
     MessageBox.Show(ms.Length.ToString()) 


    Best Regards

    Yichun Feng


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Yichun Feng Tuesday, February 24, 2009 2:05 AM
    Friday, February 20, 2009 6:52 AM