服务与Android的连接到SQL Server [英] Service to connect to SQL Server with Android

查看:444
本文介绍了服务与Android的连接到SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建我的第一个Android应用程序。我的应用程序工作在以下方式:

I'm creating my first android app. My app works in the following way:

  1. 用户登录到应用程序。

  1. User log into the app.

登录信息是一个在线服务器,它为SQL Server 2008 R2上

The login details is on an online server which is SQL Server 2008 R2

服务器将数据返回到应用程序和数据将被存储在应用程序的数据库中的数据。

The server will return data to the app and the data the data will be stored on the app's database.

我现在面临的问题是我应该如何连接到 SQL Server数据库。我研究这个课题,发现我需要使用一些服务。有人建议,以我应该使用什么样的服务?一个普通的.NET Web服务,WCF服务和Java服务。

The problem I am facing is how should i connect to Sql server database. I researched on this topic and found out that I need to use some service. Can someone suggest as to what service should i use? A normal .NET web service, WCF service or Java Service.

我还需要知道如何在我的应用程序消耗的这项服务。

I also need to know how to consume this service in my app.

软件我有我的:

  • 在Visual Studio 2008中
  • 在SQL Server 2008 R2的。
  • 在Android的开发套件及放大器; Eclipse的
  • 的SQLite

请帮我。

推荐答案

我强烈推荐Asp.Net的Web API,用于这一点:

I highly recommend the Asp.Net Web API for this:

ASP.NET包含的ASP.NET Web API创建丰富的REST-FUL Web服务返回JSON,XML,或任何类型的内容在网络支持!ASP.NET的Web的API可以为像Windows移动应用程序提供数据服务。手机,iPhone手机,Android和更多的ASP.NET Web API的可以在任何ASP.NET Web应用程序可以使用,包括ASP.NET MVC中,Web窗体或网页 - 这一切都一个ASP.NET

"ASP.NET includes ASP.NET Web API for creating rich REST-ful Web Services that return JSON, XML, or any kind of content the web supports! ASP.NET Web APIs can provide data services to mobile apps like Windows Phones, iPhones, Android and more. ASP.NET Web APIs can be used in any ASP.NET Web Application, including ASP.NET MVC, Web Forms, or Web Pages – it's all One ASP.NET."

http://www.asp.net/web-api

这篇关于服务与Android的连接到SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆