473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Debug-Look at data inside a dataset?

Is there a way, in the debugger, to look at the contents of a dataset? I
tried drilling down into my dataset and it's like exploring the registry!
Anyway, I didn't find anything useful. The code I use to fill the dataset
is below. The dataset fills OK and is usable. I just want to know how it
names things, e.g., if there are multiple instances of a column of the same
name, etc. Right now it can't find Person.Person_ID, although that is part
of my SQL, and there sometimes would be multiple person_id columns in the
result set. (If I modified the sql, of course.)

SqlDataAdapter DBSqlDataAdapter = new SqlDataAdapter(strSQL, DBconnection);

DataSet DBDataSet = new DataSet();

DBSqlDataAdapter.Fill(DBDataSet, strTable);
Oct 3 '06 #1
4 3169
Hello Laurel,

Put the breakpoint on the line beneath of your DBDataSet init, start debuggin
app from VS IDE
and then use QuickWatch debug dialog box to scrutinize the content of your
DBDataSet instance

LIs there a way, in the debugger, to look at the contents of a
Ldataset? I tried drilling down into my dataset and it's like
Lexploring the registry! Anyway, I didn't find anything useful. The
Lcode I use to fill the dataset is below. The dataset fills OK and is
Lusable. I just want to know how it names things, e.g., if there are
Lmultiple instances of a column of the same name, etc. Right now it
Lcan't find Person.Person_ID, although that is part of my SQL, and
Lthere sometimes would be multiple person_id columns in the result
Lset. (If I modified the sql, of course.)
L>
LSqlDataAdapter DBSqlDataAdapter = new SqlDataAdapter(strSQL,
LDBconnection);
L>
LDataSet DBDataSet = new DataSet();
L>
LDBSqlDataAdapter.Fill(DBDataSet, strTable);
L>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Oct 3 '06 #2
I'm not sure how this addresses my problem. The problem I face is that when
I look at dsPersonalInfo in the debugger, it shows masses of information,
but nothing about specific columns. So I don't know how to refer to
specific columns to look at the data. Actually, I'm more interested in
learning how C# refers to the specific columns than in the data right now.
For instance, if your SQL joins two tables with "Start_Date" columns that
have different data.

I'm running in a .NET environment, and don't see Quick Watch, but there are
other windows where you can look at variables. As I said, my presenting
problem is that when I look at dsPersonalInfo, it feels like exploring the
registry there's so much data, but nothing about specific columns that I can
find.

Thanks for your response, though.

"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
Hello Laurel,

Put the breakpoint on the line beneath of your DBDataSet init, start
debuggin app from VS IDE
and then use QuickWatch debug dialog box to scrutinize the content of your
DBDataSet instance

LIs there a way, in the debugger, to look at the contents of a
Ldataset? I tried drilling down into my dataset and it's like
Lexploring the registry! Anyway, I didn't find anything useful. The
Lcode I use to fill the dataset is below. The dataset fills OK and is
Lusable. I just want to know how it names things, e.g., if there are
Lmultiple instances of a column of the same name, etc. Right now it
Lcan't find Person.Person_ID, although that is part of my SQL, and
Lthere sometimes would be multiple person_id columns in the result
Lset. (If I modified the sql, of course.)
LLSqlDataAdapter DBSqlDataAdapter = new SqlDataAdapter(strSQL,
LDBconnection);
LLDataSet DBDataSet = new DataSet();
LLDBSqlDataAdapter.Fill(DBDataSet, strTable);
L---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche


Oct 4 '06 #3
Hello Laurel,

LI'm not sure how this addresses my problem. The problem I face is
Lthat when I look at dsPersonalInfo in the debugger, it shows masses
Lof information, but nothing about specific columns.

Because required info are into collections
When u look at you dataset you can see Tables property that is System.Data.DataTableCollection
You need to refer to the n-elemen to get access to the table - ds.Tables[0]
afterthat u will see the collection of collumns System.Data.DataColumnCollection
and using ds.Tables[0].Columns[0] u get all necessary info about first column
into first table
L>So I don't know
Lhow to refer to specific columns to look at the data. Actually, I'm
Lmore interested in learning how C# refers to the specific columns
Lthan in the data right now. For instance, if your SQL joins two
Ltables with "Start_Date" columns that have different data.
L>
LI'm running in a .NET environment, and don't see Quick Watch, but
Lthere are other windows where you can look at variables.

VS IDE 2005, Debug menu->Windows->Watch

LAs I said,
Lmy presenting problem is that when I look at dsPersonalInfo, it feels
Llike exploring the registry there's so much data, but nothing about
Lspecific columns that I can find.

Because Tables, Rows, Columns are kept into collections
LThanks for your response, though.
L>
L"Michael Nemtsev" <ne*****@msn.comwrote in message
Lnews:17***************************@msnews.microso ft.com...
L>
>Hello Laurel,

Put the breakpoint on the line beneath of your DBDataSet init, start
debuggin app from VS IDE
and then use QuickWatch debug dialog box to scrutinize the content of
your
DBDataSet instance
LIs there a way, in the debugger, to look at the contents of a
Ldataset? I tried drilling down into my dataset and it's like
Lexploring the registry! Anyway, I didn't find anything useful.
The
Lcode I use to fill the dataset is below. The dataset fills OK and
is
Lusable. I just want to know how it names things, e.g., if there
are
Lmultiple instances of a column of the same name, etc. Right now
it
Lcan't find Person.Person_ID, although that is part of my SQL, and
Lthere sometimes would be multiple person_id columns in the result
Lset. (If I modified the sql, of course.)
LLSqlDataAdapter DBSqlDataAdapter = new SqlDataAdapter(strSQL,
LDBconnection);
LLDataSet DBDataSet = new DataSet();
LLDBSqlDataAdapter.Fill(DBDataSet, strTable);
L---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Oct 4 '06 #4
Thanks!

"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
Hello Laurel,

LI'm not sure how this addresses my problem. The problem I face is
Lthat when I look at dsPersonalInfo in the debugger, it shows masses
Lof information, but nothing about specific columns.
Because required info are into collections
When u look at you dataset you can see Tables property that is
System.Data.DataTableCollection
You need to refer to the n-elemen to get access to the table -
ds.Tables[0]
afterthat u will see the collection of collumns
System.Data.DataColumnCollection
and using ds.Tables[0].Columns[0] u get all necessary info about first
column into first table
L>So I don't know
Lhow to refer to specific columns to look at the data. Actually, I'm
Lmore interested in learning how C# refers to the specific columns
Lthan in the data right now. For instance, if your SQL joins two
Ltables with "Start_Date" columns that have different data.
LLI'm running in a .NET environment, and don't see Quick Watch, but
Lthere are other windows where you can look at variables.
VS IDE 2005, Debug menu->Windows->Watch
LAs I said,
Lmy presenting problem is that when I look at dsPersonalInfo, it feels
Llike exploring the registry there's so much data, but nothing about
Lspecific columns that I can find.

Because Tables, Rows, Columns are kept into collections
LThanks for your response, though.
LL"Michael Nemtsev" <ne*****@msn.comwrote in message
Lnews:17***************************@msnews.microso ft.com...
L>
>>Hello Laurel,

Put the breakpoint on the line beneath of your DBDataSet init, start
debuggin app from VS IDE
and then use QuickWatch debug dialog box to scrutinize the content of
your
DBDataSet instance
LIs there a way, in the debugger, to look at the contents of a
Ldataset? I tried drilling down into my dataset and it's like
Lexploring the registry! Anyway, I didn't find anything useful.
The
Lcode I use to fill the dataset is below. The dataset fills OK and
is
Lusable. I just want to know how it names things, e.g., if there
are
Lmultiple instances of a column of the same name, etc. Right now
it
Lcan't find Person.Person_ID, although that is part of my SQL, and
Lthere sometimes would be multiple person_id columns in the result
Lset. (If I modified the sql, of course.)
LLSqlDataAdapter DBSqlDataAdapter = new SqlDataAdapter(strSQL,
LDBconnection);
LLDataSet DBDataSet = new DataSet();
LLDBSqlDataAdapter.Fill(DBDataSet, strTable);
L---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche


Oct 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike C. Fletcher | last post by:
Every few months I get to working on a Python C extension (built with distutils) and discover a pointer error or the like where I'd like to be able to step into my DLL and see where the extension...
10
by: John Smith | last post by:
After reading C# documentation the Conditional attribute seemed the way to go, but after inspecting the IL it seems those methods are still there and I imagine the CLR removes them. Using #if DEBUG...
4
by: Stephen Miller | last post by:
Hi, I am running v1.1.4322 on Win2K server and unable to debug a ASP.Net application running locally, using a full URL (ie www.mysite.com). When I hit F5, I get the following error message: ...
7
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
9
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
6
by: swartzbill2000 | last post by:
Hello, I have a VB 2005 Express project with a TraceListener-derived class to route Debug.Print output to a log file. It works fine for Debug builds. What is the correct combination of changes to...
6
by: pauldepstein | last post by:
To help me debug, I am writing a lot of information into a stream which I call debug. However, because of the large amount of time taken to print this information, I only want this printed while...
0
by: BA | last post by:
I posted on this once before and could not get a solution, I am hoping someone can help. I have a very strange code debug behavior that I cannot make heads or tails of: I have c# code being...
1
by: gfergo | last post by:
Good Morning, I seem to be having a problem. I thought I could display detailed debugging information (including file name and line number) on a page using two different methods: 1.)...
3
by: rorni | last post by:
Hi, I'm porting code from Windows to HP-UX 11, compiling with g++. I'm getting a compilation error on the system's debug.h include file, which is included very indirectly through a series of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.