Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submitting hierarquical data to database

Status
Not open for further replies.

byleth

Programmer
Feb 27, 2004
70
0
0
PT
Hi, don't know if this is the right place for this question, but here it goes.

Having read Microsoft ADO .Net from David Sceppa, i come across an way to partially solve the order problem when updating a dataset that has hierarchical data.

I've followed David Sceppa's suggestion in page 486, nevertheless i've found (as yet) a problem.. what if we:

1) Delete a record
2) Add a new record but with the same key.

When commiting to the database we get a constraint error of course.. But modifying the order in wich the submitting is made doesn't seem to be a good ideia..

Is there any workarround someone could suggest?

Any help would be appreciated, thanks
 
i forgot to mention the order suggestion in the book:

1) submit new parent records
2) submit new child records
3) submit modified parent records
4) submit modified child records
5) submit deleted child records
6) submit deleted parent records

-----------------------------------------------------

Hi, RiverGuy

What do you mean? I must work in a disconnected environment, can't update until i leave the application..
 
Is this a user-defined primary key, such as "Name," or an Identity field?
 
It's a primary key. Defined in the Data Base.

Something like:

Users Table
-----------
USER_ID (pk)
USER_NAME
ETC

 
What I meant, is this: is the user responsible for setting the value of the primary key, or is the value set by the database automatically?
 
it must be the user.. that's a problem right?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top