简体   繁体   中英

How to connect sql azure with android app and sql server

Wanna know how to connect sql azure with android app and sql server?

STEP 1: I want to use real-time sync between exist database (dbo schema and other) in sql server and azure mobile services/azure sql database.

  • If I use Microsoft SQL Data Sync Agent to connect it, What do I have to do? eg add an id column to an existing table.
  • Do you have other way better than this or any other suggestions?

STEP 2: I want to connect android app to azure mobile services or azure sql database.

  • How to connect android app to an existing Azure SQL table (from previous step) with Windows Azure Mobile Services.
  • I'm trying to connecting SQL Azure from my android application with jdbc and jtds, But it doesn't work. Do you have other way or any other suggestions?

You are working with Android . So, you need to go as:-

switch to Android Studio , if you already did it then it's fine. Use tutorials provided by Microsoft Azure Mobile Services. Here is the link to get started for Android :-

For brand new DataBase and new Mobile Services :-

https://github.com/Azure/azure-mobile-services/blob/master/docs/mobile-services-android-get-started.md

EDIT : Broken links updated

This is the answer to your step 2

If you don't want to use a brand new database and want to use your existing azure database then follow this link . This is a jtds method and I followed it and it worked for me.

You will use your jdbc connection url that comes with your database instance on azure portal with minor changes in it which are explained in the link. Your portal profile password and username will also be used in the connection url so keep in mind hackers might get a peak to it if they examine your application apk.

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