Master - Detail - Update 
Author Message
 Master - Detail - Update

I have a master detail form, when I used the dataadapter.update method to
update the data changes back to the data source, I got error messages. It
will only happen when the tables has the parent-child relation, I set this
relationship in MsAccess 2000. When I remove this relationship and go back
to program, It will work again. Why ????

Any helps will be appreciated.

Donald



Mon, 30 Aug 2004 23:55:32 GMT  
 Master - Detail - Update
This is likely a problem with the order of your updates. For example, if I
insert a record in a table that has a parent-child relationship with another
table, and I also insert child records into the child table, then I need to
ensure that the insert to the parent table is executed at the database
before the child records are inserted at the database. Likewise, if you have
a constraint that disallows the delete of a parent record until all related
child records are deleted, you'll need to process the child deletes first.
There's info on how to control the order of updates at the end of the
following topic:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...
l/cpconupdatingdatabasewithdataadapterdataset.asp

--

Doug Rothaus

------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> I have a master detail form, when I used the dataadapter.update method to
> update the data changes back to the data source, I got error messages. It
> will only happen when the tables has the parent-child relation, I set this
> relationship in MsAccess 2000. When I remove this relationship and go back
> to program, It will work again. Why ????

> Any helps will be appreciated.

> Donald



Tue, 31 Aug 2004 04:20:35 GMT  
 Master - Detail - Update
I found the problem now, The parent-child relationship between two tables I
set to force referential integrity only in MS Access , the cascade update
and cascade delete have not been checked. When I check the cascade update
and return to the vb.net program, the problem is over. Why ????

Thanks in advance.



Quote:
> This is likely a problem with the order of your updates. For example, if I
> insert a record in a table that has a parent-child relationship with
another
> table, and I also insert child records into the child table, then I need
to
> ensure that the insert to the parent table is executed at the database
> before the child records are inserted at the database. Likewise, if you
have
> a constraint that disallows the delete of a parent record until all
related
> child records are deleted, you'll need to process the child deletes first.
> There's info on how to control the order of updates at the end of the
> following topic:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...
Quote:
> l/cpconupdatingdatabasewithdataadapterdataset.asp

> --

> Doug Rothaus

> ------------------------------------------------------
> This posting is provided "AS IS" with no warranties, and confers no
rights.



> > I have a master detail form, when I used the dataadapter.update method
to
> > update the data changes back to the data source, I got error messages.
It
> > will only happen when the tables has the parent-child relation, I set
this
> > relationship in MsAccess 2000. When I remove this relationship and go
back
> > to program, It will work again. Why ????

> > Any helps will be appreciated.

> > Donald



Tue, 31 Aug 2004 22:12:20 GMT  
 Master - Detail - Update
I'm not sure. Perhaps Access is taking care of any related updates where it
wasn't before.

--

Doug Rothaus

------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> I found the problem now, The parent-child relationship between two tables
I
> set to force referential integrity only in MS Access , the cascade update
> and cascade delete have not been checked. When I check the cascade update
> and return to the vb.net program, the problem is over. Why ????

> Thanks in advance.



> > This is likely a problem with the order of your updates. For example, if
I
> > insert a record in a table that has a parent-child relationship with
> another
> > table, and I also insert child records into the child table, then I need
> to
> > ensure that the insert to the parent table is executed at the database
> > before the child records are inserted at the database. Likewise, if you
> have
> > a constraint that disallows the delete of a parent record until all
> related
> > child records are deleted, you'll need to process the child deletes
first.
> > There's info on how to control the order of updates at the end of the
> > following topic:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgu...

- Show quoted text -

Quote:
> > l/cpconupdatingdatabasewithdataadapterdataset.asp

> > --

> > Doug Rothaus

> > ------------------------------------------------------
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.



> > > I have a master detail form, when I used the dataadapter.update method
> to
> > > update the data changes back to the data source, I got error messages.
> It
> > > will only happen when the tables has the parent-child relation, I set
> this
> > > relationship in MsAccess 2000. When I remove this relationship and go
> back
> > > to program, It will work again. Why ????

> > > Any helps will be appreciated.

> > > Donald



Sat, 04 Sep 2004 05:51:42 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Master-Detail with 2 seperate detail sections per master record, CR.NET

2. ADO Master/Detail Addnew Update???

3. Inserting detail rows in master-detail configuration (VB4)

4. Link multiple datagrids to a single record (Master\Detail Form with multiple details)

5. How to update document master shapes from template master shapes

6. Copy a master-detail record into another database?

7. Master/Details Problems

8. Master Detail - whats the difference?

9. sincronize Master Detail

10. HOWTO Create a master detail relationship datagrid for Web like Tree Structure

11. Q Master-Detail forms

12. master-detail datalist

 

 
Powered by phpBB® Forum Software