Information générale
Catégorie:
Formulaires Web
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement