none
COMPlusExceptionCode 0xE0434F4E thrown executing stored procedure. RRS feed

  • Question

  • I've got some code that intermittantly is throwing an error message stating that an Object reference is not set to an instance of an Object.  The inner exception message shows that it contains  _COMPlusExceptionCode -532459699 ( OxE0434F4E )

     

    Even though I've been very liberal in my use of try { } / catch { } blocks surrounding all of my calls to ADO.net table adapters, the application reports that it is "An Unhandled Exception."

     

    * * * * *

     

    My code goes out to all 50 of our stores and retrieves each store's sales transaction log files as a text file.  The code then issues a BCP command against each of the 50 files to import all of this data into a single SQL Server table.  Once the BCP is completed, the program then uses a query table adapter to execute a stored procedure (which does not return any parameters.)  This stored procedure simply sets a "DAYID" field in all records.  (There are approximately 1.3 million records.) 

     

    During a typical run where this might fail, the application seems to hang for about 2 minutes (my timeout value in the connection string is set to 120 seconds) and then throws the error message.  If I wait for 5-10 minutes, I can simply restart the application (without making any other changes to anything) and it usually completes successfully. 

     

    The following code is a snippet from Main( ) in my code:

     

    /****************************************/

    /* run the routine to BCP the files */

    /* into SQL Server TLOG table */

    /****************************************/

    try

    {

    notice.AddLine( "Starting BCP of data into TLog." );

    if ( myStore == 0 )

    {

    tlogBCP.runBCP( tgtDate, notice ); /* BCP the raw files into SQL */

    }

    else

    {

    tlogBCP.runBCP( tgtDate, notice, myStore );

    }

    } /* end try */

    catch ( Exception e )

    {

    notice.AddLine( "Error: Unhandled exception originated from the runBCP block!\n" +

    e.Message.ToString( ) + "\n" + e.InnerException.Message.ToString( ) + "\n" );

    }

    /**********************************/

    /* update TLOG table data to set */

    /* all dayid values to tgtDate */

    /**********************************/

    try

    {

    Console.WriteLine( "Running UPDATE_DAYID stored procedure." );

    tlogBCP.UpdateDAYID( tgtDate, notice ); /* sets all DAYID values in TLOG */

    Console.WriteLine( "Running SetTLogCount stored procedure." );

    tlogBCP.SetTLogCount( tgtDate, notice ); /* routine sets TLOG_records field*/

    }

    catch ( Exception e )

    {

    notice.AddLine( "Error: Unhandled exception originated from the UpdateDAYID or SetTLogCount code!\n" +

    e.Message.ToString( ) + "\n" + e.InnerException.Message.ToString( ) + "\n" );

    }

    /****************************************/

    /* Now insert data from TLOG table into */

    /* the TLOG_ARCHIVE table */

    /****************************************/

    try

    {

    AsynchSQL.InsertToArchive( tgtDate, notice, myStatus ); /* insert data into TLOG_ARCHIVE */

    }

    catch ( Exception e )

    {

    notice.AddLine( "Error: Unhandled exception originated from the InsertToArchive block!\n" +

    e.Message.ToString( ) + "\n" + e.InnerException.Message.ToString( ) + "\n" );

    }

    /********************************************/

    /* Next step clears and inserts data from */

    /* TLOG into the day_sales_load table. */

    /********************************************/

    try

    {

    AsynchSQL.DaySalesLoad( tgtDate, notice, myStatus ); /* insert into day_sales_load */

    }

    catch ( Exception e )

    {

    notice.AddLine( "Error: Unhandled exception originated from the DaySaleLoad block!\n" +

    e.Message.ToString( ) + "\n" + e.InnerException.Message.ToString( ) + "\n" );

    }

    /********************************************/

    /* Next step clears and inserts data from */

    /* TLOG into the FSM_SALIENT_TLOG table. */

    /********************************************/

    AsynchSQL.Salient_Load( tgtDate, notice, myStatus ); /* insert int fsm_salient_tlog */

    AsynchSQL.RunSQLPlus( tgtDate, notice, myStatus ); /* copies data into Oracle */

    } /* end outter-most try */

    catch ( Exception e )

    {

    notice.AddLine( "ERROR: Caught an unhandled exception in Main( )." );

    notice.AddLine( "\nException: " + e.Message + "\n" + "Inner exception: " + e.InnerException.Message );

    notice.SendMsg( );

    }

    Monday, June 16, 2008 6:31 PM

All replies

  • Hi Code Lizard,

    Did you get an answer to this?  I have pretty much the same issue.
    Please send any response to ffalconer@westnet.com.au.

    I will check this Site as well obviously.

    Have been trying to sort this 'problomatic' issues for ages.

    We are getting it first logon of the day then after that it is fine.
    Tommorrow, same thing again... been very frustrating!!!

    Thanks in advance.

    Flint
    Friday, November 20, 2009 7:10 AM