Transaction problems between XP SP2 client and SQL2000/Win2000 server

Last post 06-13-2008 4:47 AM by anas. 1 replies.

Sort Posts:

  • Transaction problems between XP SP2 client and SQL2000/Win2000 server

    06-12-2008, 8:06 PM
    • Loading...
    • pens
    • Joined on 10-23-2006, 9:13 PM
    • Posts 5

    When I run the following code: (InsertNew inserts several rows into the database)

            using (TransactionScope tc = new TransactionScope())
            {
                ETMR.InsertNew(ETMRList);

                tc.Complete();
            }

    I get the following error:

    Server Error in '/' Application.

    The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Runtime.InteropServices.COMException: The transaction has already been implicitly or explicitly committed or aborted (Exception from HRESULT: 0x8004D00E)

    Source Error:

    Line 690:            {
    Line 691: sqlCmd.Connection = cn;
    Line 692: cn.Open();
    Line 693: Object returnobject = sqlCmd.ExecuteScalar();
    Line 694: return returnobject;

    The error only occurs if I'm running this on my local machine (XP SP2, VS2008) while trying to connect to the database server (Win2000). If I deploy the code to the server (so the code is running on the same machine as the database), it runs perfectly. What's going on?
     

  • Re: Transaction problems between XP SP2 client and SQL2000/Win2000 server

    06-13-2008, 4:47 AM
    Answer
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Jerusalem
    • Posts 4,364

    HI ,

    Not Like windows server, "distributed transaction coordinator " service in windows xp will not be started automaticly ,

    so you need to start that service , go to control panel , adminsitrative tools , services , and navigate to that service , then start it ...

     

    Regards,

    Anas Ghanem| Blog
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter