Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Catch 22
Message
De
03/09/2013 11:52:10
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01581904
Message ID:
01581905
Vues:
68
This message has been marked as a message which has helped to the initial question of the thread.
>I'm having a Catch 22 problem and I'm thinking of a best way to handle it, may be you can suggest something.
>
>In my test class we have rollback property set to true and it automatically rolls back all SQL commands.
>
>This is good as I don't want my tests to create new rows in the database.
>
>Unfortunately, for the particular case I have right now I first create parent row and then in a separate method and separate command try to create a child row.
>
>Since the original transaction was rolled back, I am getting the Foreign Key violation error and can not really test my procedure.
>
>So, what is the best way to handle this situation - I don't really want to create extra rows, but I don't want to get the SQL error either.

I am having a similar issue myself in about a support I would like to add in a specific application. It is really not clear on the best approach to handle such transactional commands when negotiating with parent-child relationship.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform