Article View: borland.public.delphi.database.dotnet
Article #94Re: Datatable Triggers
From: Marc Rohloff TeamB
Date: Tue, 11 Apr 2006 23:42
Date: Tue, 11 Apr 2006 23:42
15 lines
1748 bytes
1748 bytes
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:
<rqg9o69275gn.dlg@dlg.marcrohloff.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<443b6aa3$1@newsgroups.borland.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: "Marc Rohloff [TeamB]" <"on request"> Subject: Re: Datatable Triggers Newsgroups: borland.public.delphi.database.dotnet User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit References: <443b6aa3$1@newsgroups.borland.com> Date: Tue, 11 Apr 2006 19:42:20 -0400 Message-ID: <rqg9o69275gn.dlg@dlg.marcrohloff.com> X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR X-Antivirus: avast! (VPS 0615-1, 04/11/2006), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 65.31.1.121 X-Trace: newsgroups.borland.com 1144798941 65.31.1.121 (11 Apr 2006 16:42:21 -0700) Lines: 15 X-Authenticated-User: mrohloff Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail