Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Rows and Constraints
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00819978
Message ID:
00820302
Vues:
15
Hi Rick,

What are the data manipulations that made you want to change your approach?

jMM


>I've run into an issue in my business object layer after making some changes to the way I handle local data state.
>
>My bus objects create DataRows on the client dynamically and may not post them to the server for a while. However, all data is set on the client including IDs (which are retrieved from the server via StoredProc).
>
>My previous approach had been to create new rows, but don't add them to the datatable until save time. This worked Ok, until I needed to directly manipulate the table data directly (rare, but done on occasion). So, I thought I'll change all this to immediately add the rows to the Table.
>
>BUT - there's a major problem and that is that I can't add the rows until I have some data in it. My bus layer has things like GetBlankRecord() which is supposed to get essentially blank items which get later filled with more data.
>
>The problem here is that the data has constraints attached. Such as a Pk and non-nullable fields with nulls that won't allow me to add the row. I get things like Pk can't be null or Pk value not unique (if I prefill with 'empty' data).
>
>Short of dumping the Constraints from the Table is there a way to manage this?
jMM
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform