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

Click here to load this message in the networking platform