Tracing Data Adapter Activity ?

J

JezB

How can I trace what a data adapter is actually trying to do ? I have a
problem since my adapter is always affecting 0 rows on any "Added" or
"Modified" records in my data table, but deleted rows work fine. I can't
seem to "step into" the stored procedures when the Update method of the data
adapter is invoked.

Is there some way I can check what stored procedures are being invoked and
debug these ?
 
M

Miha Markic [MVP C#]

No, you can't use vs.net. You'll have to use database tools.
If you are using Sql Server you might use Profiler.
However, normally the error is obvious from looking at source code.
 
J

JezB

Thanks ... Ive double and triple checked the code but cant see why it would
be going wrong !
I'll look into the Profiler ...

Miha Markic said:
No, you can't use vs.net. You'll have to use database tools.
If you are using Sql Server you might use Profiler.
However, normally the error is obvious from looking at source code.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

JezB said:
How can I trace what a data adapter is actually trying to do ? I have a
problem since my adapter is always affecting 0 rows on any "Added" or
"Modified" records in my data table, but deleted rows work fine. I can't
seem to "step into" the stored procedures when the Update method of the data
adapter is invoked.

Is there some way I can check what stored procedures are being invoked and
debug these ?
 
M

Miha Markic [MVP C#]

Hi Jez,

You might post your code here and I'll take a look.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

JezB said:
Thanks ... Ive double and triple checked the code but cant see why it would
be going wrong !
I'll look into the Profiler ...

Miha Markic said:
No, you can't use vs.net. You'll have to use database tools.
If you are using Sql Server you might use Profiler.
However, normally the error is obvious from looking at source code.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

JezB said:
How can I trace what a data adapter is actually trying to do ? I have a
problem since my adapter is always affecting 0 rows on any "Added" or
"Modified" records in my data table, but deleted rows work fine. I can't
seem to "step into" the stored procedures when the Update method of
the
data
adapter is invoked.

Is there some way I can check what stored procedures are being invoked and
debug these ?
 
J

JezB

Its ok thanks - I found the problem. I had a dataset with two related tables
with cascade update/delete between them. I was updating a LastChange field
on the master table before firing its data adapter first, which had a
strange effect on the detail table, which resulted in it not firing the
appropriate stored procedure on any row! I still dont quite know why this
is, but I got round the problem by updating the detail adapter first, then
updating the master.

Miha Markic said:
Hi Jez,

You might post your code here and I'll take a look.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

JezB said:
Thanks ... Ive double and triple checked the code but cant see why it would
be going wrong !
I'll look into the Profiler ...

Miha Markic said:
No, you can't use vs.net. You'll have to use database tools.
If you are using Sql Server you might use Profiler.
However, normally the error is obvious from looking at source code.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

How can I trace what a data adapter is actually trying to do ? I
have
a invoked
and
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top