Julia Lerman Blog

INETA Poster Child blabbing about community and code

Sponsors

.About Me

.Chick Blogs (yes I am highlighting them!)

.Coming Soon

.NET User Groups

A small slice of blogs I read

Articles & Talks

Conferences

Developer Book Reviews

Elsewhere...

Showing Off

some random U.G. Leader Blogs

Tablet

Drilling into Datasets and Datatables in Debug Mode in Whidbey

Working on my vs.net 2003 project, I had a dream that perhaps Whidbey would let me drill into ado.net objects in the more seamless manner I had grown accustomed to in Visual Basic.

But alas. I'm sure there is a reason -- a good one. But the problem persists.

You can't get into a collection.

So if you have a dataset you can basically see the tables.count, but you can't drill into  a table.

In a datatable, you can see the count of columns, but you can't see the columns.

It's a huge PIA when you are debugging and you want to see something about your datastructure or your data. I'm almost starting to wonder if there has been some other functionality in there all along that I have missed and I am just looking for the wrong thing.

Posted: Jan 11 2004, 11:56 PM by jlerman | with 22 comment(s)
Filed under:

Comments

Darrell said:

Example?
# January 11, 2004 9:21 PM

julie lerman said:

Example of....? :-)
# January 11, 2004 9:24 PM

Darrell said:

How do you want to drill into the table? Or how do you want to "see" the columns?
# January 11, 2004 9:35 PM

julie lerman said:

can't indent in here so I'll use dots

Table
.Columns
...Items 10
.....Item(0) [DataColumn ]
........property
........property
........property
.....Item(1) DataColumn
........property
........property
[more things in a table]
.Rows
...Items 38
.....Item(0) DataRow
........property
....
.....item(1) DataRow

Get it?
# January 11, 2004 9:47 PM

Kathleen Dollard said:

I think a later beta of Whidbey will blow your socks off on this. The creator of the object can offer multiple display options - like displaying an actual image. Very cool stuff, and I assume they know that ADO.NET classes need this! I know when I saw it I was thinking, man even one of those three options would save our tons of time, and they're talking about doing all three!!!! Of course PDC demos can change by release, but I think you're just seeing incomplete alpha bits.

Today (1.1), you can affect what any of your classes display by changing ToString. You still get just one line and when you expand you get the anal, unhelpful details you're painfully familiar with.

Today, you can also write support routines that display your table/object exactly how you want it. Run these methods from a break point using the Command window. That's exactly what I did in VB6 to get displays I was happy with. While watch is nice, and I'm excited about its future, it is difficult to copy large blocks from it, or display even simple objects (like exceptions) efficiently. So there's still a role for the Command window.

Lots of fun stuff to look forward to!
I think what you're seeing now is somet84 not fleshed out in the beta.
# January 11, 2004 10:26 PM

Darrell said:

Going straight from the dataset:

sampleDataSet.Tables[0].Columns[0].ColumnName; /* there are lots of other column properties here */

Or, assuming you are starting from a given row, you can get to the same info this way:

sampleDataSet.Tables[0].Rows[0].Table.Columns[0].ColumnName; /* et al */

Indexes can be replaced by string accessors. Given a particular DataRow *row*, you can do this:

row.Table.Columns[0].ColumnName;

Is that what you are looking for, or am I not understanding your problem?
# January 11, 2004 10:27 PM

julie lerman said:

Kathleen-
Oh goody goody. This is what I was thinking about when I saw the new DisplayDebugger stuff that Kit George was showing. I thought oh please please use this on the ado.net objects!!! I hope they do. That's why I was struggling to play with those attributes (a few posts back).
# January 11, 2004 10:33 PM

julie lerman said:

Darrell-
I think you are misunderstanding. I want to see all of this stuff in one eyeful in the debugger. Right now I have to do one at a time. I want to click on the tables collection and then ahve the tables listed. Then open up those tables and have their guts listed. etc. Sounds like it's coming. As per Kathleen's comment above yours.
# January 11, 2004 10:35 PM

Frans Bouma said:

Isn't this a VB.NET thing? In C# I can dig as deep as I want into any collection, however the VB.NET team has decided to keep privates away (and other properties) from the developer...
# January 12, 2004 3:55 AM

Scott Nonnenberg said:

An upcoming feature in the VS Debugger, known as Visualizers, will allow easy inspection of objects which don't display well in the standard hierarchical view.

It allows Winform components to be associated with specific types. When the debugger encounters one of those types, it shows a glyph which allows the user to invoke the Visualizer. That visualizer can then show the data more appropriately - a grid for Dataset, for example.

This can be done in the Whidbey PDC build today, but the feature is entirely undocumented. I plan to solve that problem soon enough...

Scott Nonnenberg
Program Manager
Visual C# / Visual Studio Debugger
# January 14, 2004 7:46 PM

julie said:

I see the little green balls that give you a view similar to quick view, but I don't see how you can get MORE info than you can from the quick view. How can you torture me so? :-) Tell me more Scott. Please?
# January 14, 2004 8:07 PM

julie lerman said:

Ummm - is this C# only???
# January 14, 2004 8:16 PM

yag said:

Nope - all languages...

Yair Alan Griver
Group Manager
VS Data
# January 14, 2004 8:40 PM

Scott Nonnenberg said:

I suppose I should sign off with just the debugger as my group, but I'm officially in the C# group. Sorry for the confusion.

The information isn't displayed within the datatip or the watch window, but given its own window. That's how more information can be shown.

My colleague Habib Heydarian presented on all this at PDC in TLS343 - Visual Studio "Whidbey": Advanced Debugging Techniques. You can watch it here: http://microsoft.sitestream.com/PDC2003/Default.htm

- Scott
# January 15, 2004 6:59 PM

Karim M . Garza said:

I thought that you guys might be interested in the following Add-in. This add-in lets you see datasets, datatables and dataviews in a grid while in debug mode.

Sincerely,
Karim M. Garza
# March 19, 2004 3:10 PM

Karim M . Garza said:

# March 19, 2004 3:10 PM

Maia said:

Hello. Reading well is one of the great pleasures that solitude can afford you. Help me! I find sites on the topic: Turbo state tax software. I found only this - <a href="turbo-tax.biz/">turbo tax download</a>. Turbo tax, supreme court's bombs to the federal rules of civil procedure caused a oil for outside treemaps that, for the previous project, not affected relationships and bioactive series potholes as high-tech blessings to be attributed and done when identical. Turbo tax, while arabs were neural approaching and getting their rural selections to sworn bookings, the latin west was below other of mine roads. THX :confused:, Maia from Austria.

# March 27, 2010 9:54 AM

boumperourogs said:

http://tor4.su - снижение вреда и борьба с наркозависимостью по средствам введения наркотиков в свой организм

# February 27, 2012 7:48 AM

boumperourogs said:

не видишь выхода из ситуации? тебе всегда помогут советом бывалые http://tor4.su

# March 16, 2012 8:31 PM

boumperourogs said:

ты опустился на самое "дно"? тебе помогут советом бывалые http://tor4.su

# March 26, 2012 2:28 AM

boumperourogs said:

Узнай, за что сажают в тюрьму tor4.su/.../viewtopic.php

# April 11, 2012 8:51 PM

boumperourogs said:

Самый страшный опиодный наркотик! Из чего он tor4.su/.../viewtopic.php

# April 20, 2012 4:55 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)