Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > how to debug SQL-statements?

Reply
Thread Tools

how to debug SQL-statements?

 
 
Janne Lepola
Guest
Posts: n/a
 
      08-23-2007
Hi,

I recently changed developing from ASP to ASP.NET and I'm having
problems with accessing SQL-statements built by FormView. For some
reason FormView update-statement doesn't work in some cases (but neither
raises error), so I though I'd like to get response of update-statement
which was sent to SQL-server. I tried using follwing code:

Protected Sub SqlDataSource1_Updating(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.SqlDataSourceCommandEven tArgs) Handles
SqlDataSource1.Updating

resultLabel.Text = ""
resultlabel.Text = SqlDataSource1.UpdateCommand

End Sub

unfortunately this code seems to echo only preformatted SQL-update
statement without parameters. Basically update looks like "UPDATE
Something SET SomethingElse = :SomethingElse", while I'm looking for
"UPDATE Something Set SomethingElse = 'user inputted this string, hello
world!'".

How can I access this final SQL-statement?

- Janne Lepola , Finland
 
Reply With Quote
 
 
 
 
Janne Lepola
Guest
Posts: n/a
 
      08-23-2007
Janne Lepola wrote:
> Hi,
>
> I recently changed developing from ASP to ASP.NET and I'm having
> problems with accessing SQL-statements built by FormView. For some
> reason FormView update-statement doesn't work in some cases (but neither
> raises error), so I though I'd like to get response of update-statement
> which was sent to SQL-server. I tried using follwing code:
>
> Protected Sub SqlDataSource1_Updating(ByVal sender As Object, ByVal e As
> System.Web.UI.WebControls.SqlDataSourceCommandEven tArgs) Handles
> SqlDataSource1.Updating
>
> resultLabel.Text = ""
> resultlabel.Text = SqlDataSource1.UpdateCommand
>
> End Sub
>
> unfortunately this code seems to echo only preformatted SQL-update
> statement without parameters. Basically update looks like "UPDATE
> Something SET SomethingElse = :SomethingElse", while I'm looking for
> "UPDATE Something Set SomethingElse = 'user inputted this string, hello
> world!'".
>
> How can I access this final SQL-statement?
>
> - Janne Lepola , Finland


I'm working with Oracle database, so I cannot use SQL Server -debugging
options as such. Isn't there any way to access compiled statement
through SqlDataSource or FormView -component?

- Janne Lepola
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
debug="false" in web.config and <%@ debug="true" ...%> in aspx file => true or false? André ASP .Net 3 08-28-2006 12:02 PM
Config Mgr Debug/Release and Web.config Compilation debug=true RonL ASP .Net 0 04-08-2006 03:50 PM
Debug (DLL MFC) -> Debug (Static MFC) ringos75 C++ 0 04-14-2005 01:50 PM
[Howto] Compiling debug Python extensions for non-debug Python Mike C. Fletcher Python 3 10-12-2003 09:37 PM



Advertisments