• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i use remote database sqlserver from my andriod application?

 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can some tell me how to enter data into remote database i.e sql server in my case through my application?
if not possible please suggest alternatives

thanks
 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Android itself can't interact with a remote database. What you need is bridge between these two. That can be a webservice or may be a servlet.

Request
-----------
Android---->Servlet----->Database

Response
----------
Database----->Servlet----->Android
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i communicate to the servlet from my andriod app?please provide some links to refer if possible
 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks swastik!

can you give some examples which i can refer as i am new to the technology and this is my first app
 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://w3mentor.com/learn/java/android-development/android-http-services/example-of-http-get-request-using-httpclient-in-android/

http://www.anddev.org/networking-database-problems-f29/tutorial-of-calling-jsp-servlet-from-android-t1947.html

In the second case they are using URLConnection class instead of using HttpClient class. However as far as I have seen when you are on android it's better to use HttpClient class.
 
Swastik Dey
Rancher
Posts: 1602
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following is another good example, here post method is used.

http://developerlife.com/tutorials/?p=288
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankyou
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[ UD: Removed duplicate post. That discussion is already going on at http://www.coderanch.com/t/570569/Android/Mobile/enter-binary-data-sql-server. Please stop asking the same question over and over again -instead of following up in existing threads- NOW. ]
 
Nicolas de Pomereu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you to use Awake SQL, a virtual JDBC Driver that is supported on Android with a dedicated packaging. Awake SQL has a

dual license (Open Source -LGPL v2.1 & commercial)

Disclaimer: I'm the author of Awake SQL.

Awake SQL allows you to code JDBC calls in Android. The JDBC calls are routed through HTTP and executed on the remote server.

The result is sent back using JSON.
The database is not accessed directly: the JDBC calls are filtered by a (configurable) Servlet on the remote server.

Awake SQL supports all major Open Source and commercial databases.

More info at: http://www.awake-sql.org
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic