• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thankyou:)
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[ UD: Removed duplicate post. That discussion is already going on at https://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. ]
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic