Results 1 to 2 of 2

Thread: disconnected dataset problemos

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    disconnected dataset problemos

    If I have a dataset and add 2 rows to one table, 3 rows to another table and update another 2 tables what ensures that when I update/accept changes to the database the updates are carried out in the corredt order ?

    e.g

    I have 2 products which are have foreign keys to the Company table. The foreign keys are currently null.

    I add a customer record then update the products table to point to this table.

    How does ado.net know that the Company table needs to be inserted first.

    NOTE. - I am generating my own unique keys and not using autonum.

    Parksie

  2. #2
    Frenzied Member circuits2's Avatar
    Join Date
    Sep 2006
    Location
    Kansas City, MO
    Posts
    1,027

    Re: disconnected dataset problemos

    If it needs to be done in a certain order then call your update for each table in the order that you need.
    Show the love! Click (rate this post) under my name if I was helpful.

    My CodeBank Submissions: How to create a User Control | Move a form between Multiple Monitors (Screens) | Remove the MDI Client Border | Using Report Viewer with Visual Studio 2012 Express

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width