I am converting a normal CLR library over to a silverlight library.
SqlConnection, SqlCommand, SqlClient aren't recognized. What libraries do I reference? I am working in Silverlight 3.0.
I am converting a normal CLR library over to a silverlight library.
SqlConnection, SqlCommand, SqlClient aren't recognized. What libraries do I reference? I am working in Silverlight 3.0.
As far as I can tell, it is not possible to directly access SqlServer from Silverlight. This makes sense since Silverlight is designed to create "web applications", implying that you'll need to use client-server methods to access the data. You could set up a WebMethod or WCF on a web server somewhere and point Silverlight at it to get the data.
References:
http://silverlight.net/learn/tutorials/sqldatagrid-cs/
http://forums.silverlight.net/forums/t/21012.aspx
http://www.codeproject.com/KB/silverlight/CntDbSlght.aspx
SqlConnection, SqlCommand, SqlClient are from system.data. System.Data is not part of the Silverlight.
For all database related activities, you should either use a webservice/wcf service/ria services/entity data framework for all crud operations.