Article View: borland.public.delphi.database.dotnet
Article #95Re: Datatable Triggers
From: Salim Naufal
Date: Wed, 12 Apr 2006 09:38
Date: Wed, 12 Apr 2006 09:38
23 lines
1955 bytes
1955 bytes
The OnRowChanging occurs before the data is sent to the database server. Before any of the OnRowChange and OnRowChanging is fired, we get an exception saying that our primary key is null. That exception is raised by the client application and not by the server. Kind Regards Salim "Marc Rohloff [TeamB]" <"on request"> wrote: >On 11 Apr 2006 01:36:51 -0700, Salim Naufal wrote: > >> Given a table with a primary key, I used to populate this primary >> key in the AfterInsert event of the DataSet. I cannot find the >> similar triggers in DotNET. What is the best way to achieve this? I >> tried the OnRowUpated trigger of the DataTable but it doesn't >> achieve what I'm looking for. An exception is raised before >> claiming that my primary key field in the datatable cannot be null. > >I assume you mean the 'OnRowChanged' event? This happens after the >data has been posted. What you need is the 'OnRowChanging' event. > >-- >Marc Rohloff [TeamB] >marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID:
<443cca9f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<443b6aa3$1@newsgroups.borland.com> <rqg9o69275gn.dlg@dlg.marcrohloff.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,ee7e6d067d5931f0 X-Google-Attributes: gid1effe6,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Salim Naufal" <salim_naufal@hotmail.com> Sender: "Salim Naufal" <salim_naufal@hotmail.com> Reply-To: "Salim Naufal" <salim_naufal@hotmail.com> Subject: Re: Datatable Triggers Newsgroups: borland.public.delphi.database.dotnet X-User-Info: 213.175.169.4 X-Forwarded-For: 212.36.204.16 References: <443b6aa3$1@newsgroups.borland.com> <rqg9o69275gn.dlg@dlg.marcrohloff.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <443cca9f$1@newsgroups.borland.com> Date: 12 Apr 2006 02:38:39 -0700 X-Trace: newsgroups.borland.com 1144834719 207.105.83.66 (12 Apr 2006 02:38:39 -0700) Lines: 24 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail