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, 17 May 2007 11:13:39 +0100,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    mc am


[GridView] Deleting last item causes ArgumentOutOfRangeException when using Stored Procedures   
I've been scratching my head for quite a few hours over this issue and thought It might be useful if 
I share my answer.

Turns out if you are using a stored procedure to delete items from the GridView which updates 
multiple tables or fires triggers this will effect the @@ROWCOUNT value which seems to trip up the 
rendering of the GridView when deleting the last item.

The fix I settled on was to place a SET NOCOUNT ON at the start of your stored procedure and a SET 
NOCOUNT OFF at the end.

Regards


MC
Date:Thu, 17 May 2007 11:13:39 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


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