Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet w/ Multiple Tables
Message
From
29/04/2004 16:58:10
 
 
To
29/04/2004 16:53:38
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00899300
Message ID:
00899515
Views:
21
Keith,

I didn't think that she had two tables, because she said that she filled the DataSet with a join. That's why I asked her to post the code that she used to fill the DataSet.

~~Bonnie

>>>I already tried that, but when it gets to the fields that begin with bo_, it blows up.
>>
>>It shouldn't if those columns are in the table. How about posting the code you're using to get the data and fill the DataSet?
>>
>>~~Bonnie
>
>Mindy,
>
>If the DataSet is constructed with two separate tables then there will have to be two separate NewRow calls - one for each table. You can't add a row to both tables at the same time with the same NewRow.
>
>The DataSet is an in-memory replica of the tables and relationships. If you want the columns from two related tables represented by one DataSet table, it will have to come from a view in the database - which isn't updatable.
>
>It sounds like the operation you want to perform in the code is closer to the business logic than low-level database operations. Perhaps you could create a wrapper class for the DataSet that had a method to insert the data into the DataSet. The method could create the two NewRows and perform the inserts inside of a transaction.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform