简体   繁体   中英

Retrieve Data from SQL server across WIFI

I work for a company as a developer. Right now I'm trying to develop an app for the company in Android Studio in Java. They want me to develop an app that brings data from an SQL server on the Wi-Fi, from what I believe is stored on an Access webservice. (I just have the IP, the Database name and schemas, and credentials to log on.)

Basically I just need help on how to retrieve data from the server and display it in the app. All they want is for me to make a button that displays data from the server right now. I've tried going to SQLiteOpenHelper , and I'm trying to figure out jdbc again.

Is this even possible through an app? And if so, what would be the best way to achieve it?

This is a very common use case for an app.

Instead of going through the trouble of using an `SQLiteOpenHelper, I'd suggest using Google's Room library : https://developer.android.com/topic/libraries/architecture/room

And for making network calls I suggest using retrofit: https://github.com/square/retrofit

Both are very well documented.

I've tried going to SQLiteOpenHelper

That is for a local on-device SQLite database.

I'm trying to figure out jdbc again

Android has limited support for JDBC, and IMHO JDBC is not well-suited for use by mobile devices.

The typical way that an Android app would get data from a remote database is by means of an intermediary Web service. So, the Web service would talk directly to your SQL database, and the Android app would talk to the Web service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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