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 07:00:08 -0700,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    Amir Tohidi
          2    Amir Tohidi


DataTable ColumnChanging event nit firing on adaptor.Fill()   
Hi

I am successfully filling my DataSet with data using an adaptor. Prior to 
calling Fill(), I regsiter handler for the ColumnChanging event of each 
DataTable in my DataSet because I want to do field level validation of each 
data item.

Unfortunately, my event handler is NOT getting called! Does this mean that 
DataTable events do not fire during a Fill() and that they only fire AFTER a 
DataTable has been filled with data? I hope not.

By the way, if I Fill from XML my event handlers do get called as the tables 
are being filled - it is only when I go to Oracel, Sql Server and Sybase 
(yep, we use them all!) that the handlers do not get called.

Any help on this would be much appreciated.
Date:Thu, 23 Aug 2007 07:00:08 -0700   Author:  

RE: DataTable ColumnChanging event nit firing on adaptor.Fill()   
Turns out this is a design feature!!!

I found the following note on MSDN

Most operations that add or delete rows do not raise the ColumnChanged and 
ColumnChanging events. However, the ReadXml method does raise ColumnChanged 
and ColumnChanging events, unless the XmlReadMode is set to DiffGram or is 
set to Auto when the XML document being read is a DiffGram.

see http://msdn2.microsoft.com/en-us/library/w9y9a401(VS.80).aspx


"Amir Tohidi" wrote:


> Hi
> 
> I am successfully filling my DataSet with data using an adaptor. Prior to 
> calling Fill(), I regsiter handler for the ColumnChanging event of each 
> DataTable in my DataSet because I want to do field level validation of each 
> data item.
> 
> Unfortunately, my event handler is NOT getting called! Does this mean that 
> DataTable events do not fire during a Fill() and that they only fire AFTER a 
> DataTable has been filled with data? I hope not.
> 
> By the way, if I Fill from XML my event handlers do get called as the tables 
> are being filled - it is only when I go to Oracel, Sql Server and Sybase 
> (yep, we use them all!) that the handlers do not get called.
> 
> Any help on this would be much appreciated.
Date:Thu, 23 Aug 2007 08:12:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


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