DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 23 Aug 2007 08:58:41 +0300,    posted on: microsoft.public.dotnet.framework.aspnet.webcontrols        back       

Thread Index
  1    Janne Lepola
          2    Janne Lepola


how to debug SQL-statements?   
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
Date:Thu, 23 Aug 2007 08:58:41 +0300   Author:  

Re: how to debug SQL-statements?   
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.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'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
Date:Thu, 23 Aug 2007 09:25:19 +0300   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us