DbProvider GetFactory exception with system.data.sqlclient

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I received an exception when I tried to use provider name
"system.data.sqlclient" to create a db factory.

DbProviderFactory dbFactory =
DbProviderFactories.GetFactory("system.data.sqlclient");

The exception message is:-
"Unable to find the requested .Net Framework Data Provider. It may not be
installed."

I have SQL Server 2005 and Visual Studio 2005 installed on my system.
Can someone tell me what did I do wrong or miss?

Thanks
 
use "System.Data.SqlClient" instead of the lower cased spelling. It' case
sensitive. Change the casing and you should be fine. If not let me know.

Bill
 
Back
Top