Solved

Controlling the order data is saved in a DataSet

Posted on 2013-06-28
2
305 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
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now