我们可以从 Android 应用程序连接到 sql server 吗?

我们可以从 Android 应用程序连接到 sql server 吗?

问题描述:

我正在开发与网站相关联的应用程序.我的应用程序主屏幕包含登录和注册按钮.在用户注册时,所有字段值都必须存储在 SQL Server 中.

I am developing an application which is associated with a website. My application home screen contains login and register buttons. In user registration, all field values have to be stored in SQL Server.

是否可以从移动 Android 应用程序连接到 SQL Server?如果是这样怎么办?

Is it possible to connect to SQL Server from a mobile Android application? If so how?

在您的网站上,我将创建仅公开您在 Android 应用程序中需要的信息的服务.永远不要传递 SQL 字符串.正如罗宾所说,这是一个重大的安全问题.然后只需在您的应用中使用这些服务.

On your website, I would create services that expose just the information you will need in your Android application. Never pass SQL strings. As Robin said, that's a major security issue. Then just consume these services in your app.