Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show the data in a dataset?

I am trying to view the data in a Dataset, I don't mind what view it is, i can print it out in a text file or show it in a Datagrid I am just trying to discover whats in side. I am testing a Webservice to see if it returns results and i have it returning a Dataset.

ServiceReference1.PropertiesSoapClient ws1 = new ServiceReference1.PropertiesSoapClient();
            ws1.Open();

 DataSet datasetprint = new DataSet();
            if (ws1 != null)
            {
                ServiceReference1.ReturnValuationRequest request = new ServiceReference1.ReturnValuationRequest(UserID, trackingNumber);
                ServiceReference1.ReturnValuationResponse response = ws1.ReturnValuation(request);
                if (response.ReturnValuationResult != null)
                {
                    DataSet ds = response.ReturnValuationResult;
                    datasetprint = ds;            
                }
            }

Whats the best way for me to view its Content?


Edit:

I would prefer not just looking thought the break point as its endless with so much data i that does not make sense.

enter image description here

I would prefer viewing it in a datagrid or even in a Textfile.

like image 954
Pomster Avatar asked Nov 19 '25 01:11

Pomster


2 Answers

If you want to view it without any additional code, just use the debugger to set a breakpoint after the dataset gets populated and hover over the dataset variable name, a little popup comes up and then click the little magnifying glass in the popup.

Its called the dataset visualizer, I think.

Just a note, it can timeout your debugging session and do some other funky stuff. If it times out then you won't be able to continue stepping through your code.

like image 139
Gerard Sexton Avatar answered Nov 20 '25 15:11

Gerard Sexton


You should use the looking class icon. The mouse hover menu is comprised of the following elements:

  • expand object properties ('+' icon)
  • variable name ('datasetprint')
  • looking glass (image)
  • dropdown menu (donno what for :P)
  • object type (System.Data.DataSet)
  • pin icon (so the hover menu stays in place)

When you press the looking glass a datagridview opens, you can view the data here or copy it to view elsewhere.

like image 36
MrFox Avatar answered Nov 20 '25 15:11

MrFox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!