Invalid MSDTC on server

Aug 28 2012 6:46 PM
hi, 
I have te following, 
private void Cmd_PrintFichRensRPT_Click(object sender, EventArgs e)
        {
            bool MAJ = false;
 
            if (DTGVFicheRensRPT.RowCount != 0)
            {
                using (TransactionScope transaction = new TransactionScope())
                {
                    try
                    {
                        for (int l = 0; l <= DTGVFicheRensRPT.RowCount - 1; l++)
                        {
                            string DosID = DTGVFicheRensRPT.Rows[l].Cells[8].Value.ToString();
                            //MAJ
                            MAJ = ExecuteRequete.ExecuteStoredProcedure("MAJStatutDossier", new SqlParameter("@StaId", 11), new SqlParameter("@DosID", DosID),
                                   new SqlParameter("@staBL", null), new SqlParameter("@staCRprod", null));
                        }
                    }
                    catch (Exception Message)
                    {
                        MessageBox.Show(Message.ToString()); 
                    }
                    // Valider la transaction
                    transaction.Complete();
                }
                if (MAJ )
                {
                    CRV_FichRensRPT.PrintReport();
                    UtilsProcFunc.Edition(this, 1);  
                }
                else
                { UtilsProcFunc.Edition(this, 1); }
            }
            else
            {
 
            }
        }
 
at the execution i have the following error after the first execution of the 'for statement' "Invalid MSDTC on server MarcelleNGOUNOU\SQLEXPRESS is unavailable for prameter MachineName"
and its move to transaction.complete but did not rollback!

I don't understand this error
 

thanks for your help

Answers (3)