Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSet w/ Multiple Tables
Message
De
29/04/2004 16:58:10
 
 
À
29/04/2004 16:53:38
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00899300
Message ID:
00899515
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform