[inline]

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> On Behalf Of David Sceppa
>
>      The behavior can be linked back to your
> ForeignKeyConstraint object.  You set its AcceptRejectRule
> property to Cascade.  When a DataAdapter submits a pending
> change in a row, it implicitly calls the AcceptChanges method
> on the row if the update attempt succeeds.  By setting the
> AcceptRejectRule property to Cascade, you're cascading that
> call to AcceptChanges to the related child rows as well.

That's the boy!
Thanks David, these implicit calls are the things that make the learning
curve steep :-)
(That and inexperience of course <bg>)

Heh..on a related note, I'm sure I'm disposing of more things than I
need to, etc (thinking that some of the other objects are probably
disposing of their associated objects when they are disposed themselves)


> (I know in your case you're not dealing with pending
> deletions at the parent level, but this is just a generalization)

Still much appreciated
I'm sure I'll be in the case you describe soon, so this will prove to be
a future life-saver

>      I'm not a big fan of using GetChanges to isolate inserts
> vs. updates vs. deletes because it creates a separate copy of
> the data, which means that after you've submitted your

Yeah I didn't like doing it
It did the job, but it was so untidy that I was sure there was a better
way

> data to get it back in synch.  This process can get rather
> hairy if you're working with pending inserts that generate
> new auto-increment values on the server.  The Select method

Hee hee..yeah
I noticed that when I merged the updated GetChanges version with the
original..and ended up with two parent records :-)
Of course in my case, if I updated against the original I had problems
hence the GetChanges ratherthan the Select, but of now I know the *real*
cause of my problems

>         I hope this clears things up a little.  There's more
> information on the scenario in Chapter 11 of "Microsoft
> ADO.NET" from Microsoft Press.

Waterstones here I come :-)
Thanks again David

Merak

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to