I know this topic has already a solution on stackoverflow. But for instance I can't use HttpClient to read a value from my MySQL database. So actually I am looking for a really simple code which can allow to read one value of a MySQL database. Do you have an example which works for API 24?
Asked
Active
Viewed 44 times
-4
-
Why are you using HttpClient to read a value from MySQL database? – Rahul Kumar Jun 13 '17 at 16:52
-
Please explain your question more clearly what you want to do. – Rahul Kumar Jun 13 '17 at 16:57
-
First of all: Search for JDBC connection. Second: search why should i use an api for database access. If you want some thing simple, try use https://firebase.google.com/docs/reference/ – Edgard Leal Jun 13 '17 at 17:30
-
I saw but I did not see any short examples so I am a little bit disappointed by your answers :/ – Bruce Jurgens Jun 13 '17 at 19:47
1 Answers
0
You need to use a library called jtds This will allow you to manage sql server connections in your Android app. However the comment is correct this will only work with MS SQL Server.
However I found this while I was digging, apparently one of the answers denotes that if you find the correct version of MySQL Connector/J you may be able to get it working. However the functionality may only be available in the target api version that the connection driver works with. See SO post

nulltron
- 637
- 1
- 9
- 25
-
Thank you for your answer but right now I have no idea to do what I wanted to do. :/ – Bruce Jurgens Jun 13 '17 at 19:46