I am developing an android application, in that application i simply created login page in that login page i need to load mssql database for login. Please tell the solution and example coding for this one
Asked
Active
Viewed 1,311 times
-4
-
MSSQL database installed in server host – Prakash M Jun 18 '15 at 10:41
-
1"Please tell the solution and example coding for this one" == "Please code for me"... – 2Dee Jun 18 '15 at 10:45
-
You shouldn't do that, you'd better call an API to login a user, connecting directly to a db from the outside world may lead to huge security problems. if an attacker can get your DB password, he can use it to steal your whole table(s)... – n00dl3 Jun 18 '15 at 10:49
-
how can i call api. i dont abt api – Prakash M Jun 18 '15 at 10:52
-
1see @Merlí Pérez Escarpenter's answer. But it is trully not an android issue, whatever is your technology, your DB should only be accessed by trusted users, on your private network or on localhost, not by anyone from anywhere. – n00dl3 Jun 18 '15 at 10:59
-
Write a WebService on the server side and consume it on the client side. – Phantômaxx Jun 18 '15 at 11:07
1 Answers
2
Wow this is a really complicated!! The apps can't connect directly with server how do websites... Remember the devices it's possible lose internet, then how you connect with you server database? The most important of devices is can work offline, in this moment our app needs a webservice (API) to connect with database from server. Read this posts for more info (that includes code)!
How we do an API? (Server part)
How we connect our android device with server? (Device part)
Other important post:
Tell me if I helped you and good programming!

Community
- 1
- 1

Merlí Escarpenter Pérez
- 2,569
- 3
- 26
- 49