How do I access SQL Server from Windows 8 apps?

耗尽温柔 提交于 2019-12-10 14:46:53

问题


I realize that a local SQL Server instance is not accessible to my Windows 8 app. Instead, I have a SQL Server in Azure. In SQL Server Management Studio, I just change the querystring and interact with the Azure database like any other. How can I reference that database in my Windows 8 app?


回答1:


You can't access directly on sql databases.. Because Windows 8 Apps different from windows forms. But you can be used web services or azure, amazon services, storage files etc.




回答2:


This is what the Azure Mobile Services SDK is for. Scott Guthrie did a writeup on it a while back.

Undoubtedly you're aware that both ado.net and Entity Framework are missing from WinRT... Notice the glaring absence of support for System.Data.




回答3:


sounds like you want to develop a web service talking to your database, deploy it to IIS on your Azure instance and then consume it from your Windows 8 application (by adding a web reference to your web service in Visual Studio).




回答4:


You can also place an OData head on the database, then use various OData client-side libraries to talk to it via REST. See http://www.odata.org/libraries for both client and server libraries. SQL Server on Azure is definitely supported, as is .NET, JavaScript, and other platforms on the client side.




回答5:


Here this Link explains you how to access the sql server from azure



来源:https://stackoverflow.com/questions/13770834/how-do-i-access-sql-server-from-windows-8-apps

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