none
SQL Server Express - Unable to find the requested .Net Framework Data Provider. It may not be installed. (System.Data) RRS feed

  • Question

  • Hi,

    I am trying to creat a table in local db in SQL Server 2012 and I am getting the following error:

    "Exception has been thrown by the target of an invocation. (SQLEditors)"

    and then when I try it again

    "Unable to find the requested .Net Framework Data Provider.  It may not be installed. (System.Data)"

    Thanks in advance!
    Lukas

    • Moved by Bob Beauchemin Friday, March 13, 2015 8:19 PM Moved to a more relevant forum
    Friday, March 13, 2015 10:05 AM

Answers

  • I think you need to see:

    Exception Thrown – A Moment Of Clarity

    So this got me thinking, if the DLL file was there (I checked) why could Windows not find it? I could also not run Notepad or Remote Desktop Connection and all their icons were missing and showing as unrecognized files.

    Exception Thrown

    Exception Thrown

    I then decided to go and look at my Environment Variables because I saw that the shortcut to the applications made use of the environment variables. So in the Control Panel under System, I clicked on ‘Advanced system settings’ and Windows 7 displayed this gem of a message to me. Refer to the Gandalf gif above.

    Exception Thrown

    Ok, so I had to go the long way round to view the Environment Variables. Click on SystemPropertiesAdvanced.exe in the System32 sub-folder in Windows.

    Exception Thrown

    When System Properties open up, click on the Environment Variables button to view and edit these values.

    Exception Thrown

    First thing I checked was windir which seemed fine.

    Exception Thrown

    Then I noticed the Path variable. The value of this was insanely long. I was so dumbfounded, I checked this in the registry editor to be sure.

    Exception Thrown

    So in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment you will see the Path value. To give you an idea of what this variable contained, look here:

    That is a total of 2473 characters. So I Googled the problem and it seems as though it is a common issue. It seems as though as soon as the Path variable exceeds 2048 characters, other variables such as windir stop working. What I did was delete many of the entries from this Path variable (you will notice, the paths are separated by a semicolon), and after a reboot, everything started working fine again.

    Take Away – The Gist

    If you are seeing these errors, do the following:

    • Run the following program – c:\windows\system32\systempropertiesadvanced.exe
    • Check the length of the Path variable by pasting it into a word document and check the character count
    • Remove some of the entries until the length is under 2048 characters
    • Reboot your PC

    I am not sure if there are any other causes for the errors described above, but on my Windows 7 machine, this is what solved it. After I fixed this, my applications (Visual Studio, SQL Server and SYSPRO 7) immediately started working and my Notepad, Remote Desktop Connection and icons all returned after a reboot.

    http://www.dirkstrauss.com/programming/exception-thrown-target-invocation#.VQpeFeFzKug


    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

    Thursday, March 19, 2015 5:30 AM
  • I found a similar question on the forums.

    Looks like the answer is to remove empty DbProviderFactories element from Machine Config file(s) found here:

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Machine.Config
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Machine.Config

    If it is still an issue after that try re-installing Sql Server Management Studio.


    -Igor

    Friday, March 13, 2015 10:21 AM

All replies

  • I found a similar question on the forums.

    Looks like the answer is to remove empty DbProviderFactories element from Machine Config file(s) found here:

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Machine.Config
    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Machine.Config

    If it is still an issue after that try re-installing Sql Server Management Studio.


    -Igor

    Friday, March 13, 2015 10:21 AM
  • I think you need to see:

    Exception Thrown – A Moment Of Clarity

    So this got me thinking, if the DLL file was there (I checked) why could Windows not find it? I could also not run Notepad or Remote Desktop Connection and all their icons were missing and showing as unrecognized files.

    Exception Thrown

    Exception Thrown

    I then decided to go and look at my Environment Variables because I saw that the shortcut to the applications made use of the environment variables. So in the Control Panel under System, I clicked on ‘Advanced system settings’ and Windows 7 displayed this gem of a message to me. Refer to the Gandalf gif above.

    Exception Thrown

    Ok, so I had to go the long way round to view the Environment Variables. Click on SystemPropertiesAdvanced.exe in the System32 sub-folder in Windows.

    Exception Thrown

    When System Properties open up, click on the Environment Variables button to view and edit these values.

    Exception Thrown

    First thing I checked was windir which seemed fine.

    Exception Thrown

    Then I noticed the Path variable. The value of this was insanely long. I was so dumbfounded, I checked this in the registry editor to be sure.

    Exception Thrown

    So in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment you will see the Path value. To give you an idea of what this variable contained, look here:

    That is a total of 2473 characters. So I Googled the problem and it seems as though it is a common issue. It seems as though as soon as the Path variable exceeds 2048 characters, other variables such as windir stop working. What I did was delete many of the entries from this Path variable (you will notice, the paths are separated by a semicolon), and after a reboot, everything started working fine again.

    Take Away – The Gist

    If you are seeing these errors, do the following:

    • Run the following program – c:\windows\system32\systempropertiesadvanced.exe
    • Check the length of the Path variable by pasting it into a word document and check the character count
    • Remove some of the entries until the length is under 2048 characters
    • Reboot your PC

    I am not sure if there are any other causes for the errors described above, but on my Windows 7 machine, this is what solved it. After I fixed this, my applications (Visual Studio, SQL Server and SYSPRO 7) immediately started working and my Notepad, Remote Desktop Connection and icons all returned after a reboot.

    http://www.dirkstrauss.com/programming/exception-thrown-target-invocation#.VQpeFeFzKug


    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

    Thursday, March 19, 2015 5:30 AM