DbProvider GetFactory exception with system.data.sqlclient

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
 
W

W.G. Ryan - MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top