none
Error-System Type Initialization Exception occured in system data dll RRS feed

  • Question

  •  hello sir,

                 because of transferring my project from one pc to another pc i am getting following error:

    error massage:

    first chance exception of type 'System.TypeInitializationException' occurred in System.Data.dll

    Additional information: The type initializer for 'System.Data.Common.DbConnectionOptions' threw an exception.

    If there is a handler for this exception, the program may be safely continued.

    also attached image of error massage

    so how to by pass this error

    please help,

    regards,

    kavi-kalash

    Tuesday, January 27, 2015 4:17 AM

Answers

  • Hello,

    >>1. initially on first PC i worked with .net version 4.5 now the PC i am transfer my project the .net version is 4.0 so shall i update my .net version to 4.5 will it help ???

    I do recommend you have a try, it may be that some features of your project is depended on the new .NET Framework version.

    >>2. if same code i use in new project in new project it is working without any error.

    Ok, from your provided code, it obviously that you are working with a C++ application, for this, my suggestion is you could post it to the C++ forum there are C++ experts who will help you.

    The current forum is for .NET based application.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 29, 2015 8:51 AM
    Moderator

All replies

  • Hello,

    >>because of transferring my project from one pc to another pc i am getting following error:

    This seems to be related with an environment issue, please have a check the worked machine and the non-worked one, to compare if there are some difference.

    >>If there is a handler for this exception, the program may be safely continued.

    This could be due to missing references. Or it could be due to an error in the app config file. Is it possible for you to post your code about the connect part and the connection string? And here is an article describes how to process the first chance exception:

    https://msdn.microsoft.com/en-us/library/dd997368(v=vs.110).aspx

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 28, 2015 6:50 AM
    Moderator
  • hello sir,

    thank you for your reply

    here is code

    also few things i observed:

    1. initially on first PC i worked with .net version 4.5 now the PC i am transfer my project the .net version is 4.0 so shall i update my .net version to 4.5 will it help ???

    2. if same code i use in new project in new project it is working without any error.


    • Edited by kavi kalash Thursday, January 29, 2015 12:15 PM
    Wednesday, January 28, 2015 9:55 AM
  • Hello,

    >>1. initially on first PC i worked with .net version 4.5 now the PC i am transfer my project the .net version is 4.0 so shall i update my .net version to 4.5 will it help ???

    I do recommend you have a try, it may be that some features of your project is depended on the new .NET Framework version.

    >>2. if same code i use in new project in new project it is working without any error.

    Ok, from your provided code, it obviously that you are working with a C++ application, for this, my suggestion is you could post it to the C++ forum there are C++ experts who will help you.

    The current forum is for .NET based application.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 29, 2015 8:51 AM
    Moderator