Home All Groups Group Topic Archive Search About

DataAdapter Query Access

Author
30 Mar 2005 2:15 PM
Johny
Hi people, i have a question about this:

I need to know how can i obtain the sql queries (Insert, Update, Delete)
that are executed by DataAdapter.Update on a DataSet. I know that i can see
that queries on SQLProfiler but i want to obtain that sentences on my
code...It's possible???

I hope you can help me...

Regards

Johny

Author
30 Mar 2005 2:38 PM
Cor Ligthert
Johny,

When your selects are not to complicated than the commandbuilder.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlcommandbuilderclasstopic.asp

I hope this helps,

Cor
Author
30 Mar 2005 2:43 PM
David Young
You can do this by querying the DataAdapter.UpdateCommand.CommandText
property.

You can also get the:
DataAdapter.SelectCommand.CommandText
DataAdapter.DeleteCommand.CommandText
DataAdapter.InsertCommand.CommandText

Hope that helps.
David

Show quote
"Johny" <Jo***@discussions.microsoft.com> wrote in message
news:D423EFF4-C0C0-44E3-AB0A-7E11FD687E3C@microsoft.com...
> Hi people, i have a question about this:
>
> I need to know how can i obtain the sql queries (Insert, Update, Delete)
> that are executed by DataAdapter.Update on a DataSet. I know that i can
see
> that queries on SQLProfiler but i want to obtain that sentences on my
> code...It's possible???
>
> I hope you can help me...
>
> Regards
>
> Johny
Author
30 Mar 2005 10:07 PM
Johny
Tks but i want to do another thing...Example: When i send to my server 30
rows the DataAdapter uses the InsertCommand or other to accomplish that but
that is just a template....All just that i need is the 30 queries that was
executed on my db server...It's possible???

Regards

AddThis Social Bookmark Button