By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,507 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,507 IT Pros & Developers. It's quick & easy.

Debug-Look at data inside a dataset?

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.