简体   繁体   English

如何直接从MS SQL Server向Android发送数据?

[英]How to send data directly from MS SQL Server to android?

I'm trying to send data from MS SQL Server to an android app, and I've seen online tutorials so far, they only teach how the receive/insert data from/into MS SQL Server from the android side. 我正在尝试将数据从MS SQL Server发送到android应用程序,到目前为止,我已经看过在线教程,它们仅教导如何从android端接收数据或将数据插入MS SQL Server。 Is there any way to send data to android from the SQL server side "live"? 有什么方法可以从SQL Server端“实时”向Android发送数据吗?

In my context, I have a website created in visual studio with the sql server in the same project, and I want to send a notification to the android app upon clicking a button in the website. 在我的上下文中,我有一个在Visual Studio中创建的网站,并且SQL Server位于同一项目中,并且我想在单击网站上的按钮后向Android应用发送通知。

For receiving data from MS SQL Server using android app, I used Microsoft's jtds driver, which I imported into the android app. 为了使用Android应用程序从MS SQL Server接收数据,我使用了Microsoft的jtds驱动程序,该驱动程序已导入到Android应用程序中。 Can this driver be used to receive data as well? 该驱动程序也可以用于接收数据吗?

Yes you can, but i have no idea if this works with you db client. 是的,您可以,但是我不知道这是否适用于您的数据库客户端。

You can use the SQL-Server Service Broker to send notifications to clients. 您可以使用SQL Server Service Broker将通知发送给客户端。 These notifications can triggered by table triggers like insert, update and delete. 这些通知可以由表触发器(如插入,更新和删除)触发。

Service Broker @ MSDN 服务代理@ MSDN

How to push the data from database to application? 如何将数据从数据库推送到应用程序?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM