×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

submitting hierarquical data to database

submitting hierarquical data to database

submitting hierarquical data to database

(OP)
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

RE: submitting hierarquical data to database

Maybe forcing an Update on deletes.

RE: submitting hierarquical data to database

(OP)
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..

RE: submitting hierarquical data to database

Is this a user-defined primary key, such as "Name," or an Identity field?

RE: submitting hierarquical data to database

(OP)
It's a primary key. Defined in the Data Base.

Something like:

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

RE: submitting hierarquical data to database

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?

RE: submitting hierarquical data to database

(OP)
it must be the user.. that's a problem right?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close