开发者

cannot build silverlight library, what references do I need?

I am converting a normal CLR library over to a silverlight library.

SqlConnection, SqlCommand, SqlClient aren't recognized. What libraries 开发者_如何学Pythondo I reference? I am working in Silverlight 3.0.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜