J
Janne Lepola
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.SqlDataSourceCommandEventArgs) 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 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.SqlDataSourceCommandEventArgs) 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