Silverlight Database connecting issue

我是研究僧i 提交于 2019-12-24 09:25:15

问题


Hello guys I am working on silverlight and I have issue regarding on database connectivity.

I had tried with sqlce, but this is not working. I was tried with much of blog but still is not working.

so as well as MS Access also not connecting so is there any solution for the outofbroser application

I am really getting stuck. beacause I am using Isolation storage but it's still not providing ID so there is no scope to use it.

It's really solid problem I am suffering to using silverlight.

Is there any solution for this how to connect database with silverlight.

Thanks...!!


回答1:


Yes, always there is a solution.

Silverlight does not support Database connectivity, I know it seems weird but it is very good for a lot of reasons.

The solution is to create a WCF Service and use it to get the data.

Silverlight <---> WCF Service <---> SQL Server

Here is a simple example: Consuming WCF Services in Silverlight

and here is an advanced one: Using WCF RIA Services




回答2:


Looks like you are trying to connect to a database directly from a Silverlight application.

That is not possible. Silverlight does not provide a way to connect to a database directly. You must use a Web Service instead.

Try looking into WCF Data Services/RIA Services. They work great with Silverlight applications.

Here is a good tutorial from Brad Abrams on RIA Services.



来源:https://stackoverflow.com/questions/5155230/silverlight-database-connecting-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!