views:

100

answers:

1

Hi

can i do it? I just wanna make SELECT/INSERT into a remote database, i think it have to be easy but i can't find the way. I only find people that tell i have to make a webservice or something like that, but that is another world for me, and i can't put a webservice in the database host...

¿there is not a normal way to do it without a webservice?

thanks

+1  A: 

Sure - you could create a web page or two on your server and pass the values as query string parameters to the pages. Have the web pages grab the query string parameters and make the appropriate SQL call. This approach tends to be more insecure than using web services, so you may want to add some sort of authentication to the requests.

Jonathan
you mean that i have to put webpages with PHP on the remote database host?i can't do it! i told in first posti can't put anything on the remote database hosti only have the possibility to connect with it and do select/insert, nothing morei just have database direction/database name/user/password, and i can't upload anything to remote database host, only connect with it
AndroidUser99
You can do that, or you can place the pages on a different server if you can connect to the database remotely. Larger, high-traffic sites often use a separate server as the database server. Do you have a way to connect to the database from a separate server (i.e. your web server)?
Jonathan
You can't make direct, remote sql connections from android
Falmarri
It doesn't matter - the SQL connection is made from the webpage not the Android app.
Jonathan
no i just have to connect to the BD with my android application, i dont have a separate server
AndroidUser99
it is not possible to do it then?
AndroidUser99
If Falmarri (and the post listed below) are correct, you cannot connect directly to a remote SQL Server database from Android. You will need some way to interface with the database, and a web service would be the optimal way. You can do it with a webpage, but it will cost you security and features. -> http://stackoverflow.com/questions/2379237/android-with-sql-server-2008
Jonathan