8

In VS 2010 I use these steps to connect to SQL Server database:

  1. in server explorer window,Right Click on Data Connections
  2. Click Add Connection
  3. in choose data source window ,select SQL Server
  4. click continue, button
  5. "Add Connection" window will appear
  6. in the server name text box type ".\sqlexpress"
  7. in the select or enter database name type"Person"
  8. Click Test Connection -- i see "test connection successed"
  9. Finally Click OK Button

At step 9 I see this error: "Unable ti find the requested .Net Framework Data Provider It May not be Installed"

tomRedox
  • 28,092
  • 24
  • 117
  • 154
AComputer
  • 519
  • 2
  • 10
  • 21

1 Answers1

10

There is a self terminating node in the machine.config file. Removing it solved the issue.

machine.config is found in

\Windows\Microsoft.net\Framework\vXXXX\machine.config

You could have a multitude of config files based on how many versions of the framework are installed, including 32 and 64 bit variants.

<system.data>
    <DbProviderFactories>
        <add name="Odbc Data Provider" invariant="System.Data.Odbc" ... />
        <add name="OleDb Data Provider" invariant="System.Data.OleDb" ... />
        <add name="OracleClient Data Provider" invariant="System.Data ... />
        <add name="SqlClient Data Provider" invariant="System.Data ... />
        <add name="IBM DB2 for i .NET Provider" invariant="IBM.Data ... />
        <add name="Microsoft SQL Server Compact Data Provider" ... />     
    </DbProviderFactories>

    <DbProviderFactories/>  //remove this one
</system.data>

Above file remove <DbProviderFactories/> empty tag.

For additional reading Obtaining a DbProviderFactory (ADO.NET)

I hope this will help to you.

tomRedox
  • 28,092
  • 24
  • 117
  • 154
Sampath
  • 63,341
  • 64
  • 307
  • 441
  • Are you using a sock puppet account? – Hans Passant Dec 16 '12 at 17:12
  • @HansPassant Actually If I don't know something then I try to find it on the web and give it to the client what he is expecting(meantime I am also learning.That's why I joined here) .Is it wrong ? Tell me how to do it properly.B'cos I am quiet new to Stack Overflow. – Sampath Dec 16 '12 at 17:52