?
Solved

Controlling the order data is saved in a DataSet

Posted on 2013-06-28
2
Medium Priority
?
311 Views
Last Modified: 2013-07-04
I've got a number of tables in my DataSet, but I can't seem to control the order they are saved in, and sometimes this results in foreign key errors.

There are lots of useful tips about using DataSets - for example here:

http://www.dotnetperls.com/dataset

but I can't find how to ensure one table is saved first to fix this problem. Can anyone point me in the right direction here?
0
Comment
Question by:purplesoup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 39285238
Do not Update the DataSet. Update the individual tables, in the proper order. The mechanism for tables is the same as for a DataSet.
0
 

Author Comment

by:purplesoup
ID: 39299367
ok thanks - well it turns out after some investigation that with foreign keys we had code to check the relations between the tables and update consistently, but somehow bad data was getting into the DataSet which lost the relations - so yes, the answer is to update the tables individually in the proper order.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question