Thanks Bob,
I got very good information from this...
Let me explain thing i want to do..
There is a database present at some IP http://10.117.23.45/databases/database.db
I want to access this database from my android application.. for this
im using HttpURLConnection interface..

The way that im accessing the database is fine r not????
        try
        {
                URL url = new URL("http://www.uploadhub.com/mobile9/
gallery/gallery_android/");
                HttpURLConnection conn =
(HttpURLConnection)url.openConnection();
                conn.setDoInput(true);
                conn.setDoOutput(true);
                conn.setUseCaches(false);
                conn.setRequestMethod("POST");
       }
The code above i have given is some sample only..

As u said how to implement RESTful interface instead of doing this??
If u have any idea of code please let me know...

Thanks for the information in advance..

Cheers
Uday


On Mar 18, 4:26 am, Bob Kerns <r...@acm.org> wrote:
> Please don't do this. You really, really don't want to do this. I've
> written about this before -- it's the wrong way for a lot of reasons
> -- security, interoperability, performance, maintainability,
> upgradability, compatibility with firewalls...
>
> What you want to do instead, is to build a web service, that exposes
> the proper functionality. I'd suggest a RESTful interface (google it;
> there are lots of examples and documents available), as it's more
> flexible and simpler than SOAP.
>
> You don't even want to expose yourdatabaseserver to the internet. It
> should be securely behind a firewall.
>
> And think about what happens when you want to change yourdatabase,
> and you have all these applications out there, expecting to be able to
> use specific SQL queries to get at the data. You cannot force users to
> upgrade. You can just break, of course -- but you'll lose a lot of
> customers, and a lot of them will tell other customers to stay away --
> and they'd be right.
>
> Actually, I just saw the message that says you're using Sqllite. So
> you CAN'T even do it anyway, even if you wanted to. There is no
> network access to Sqllite.
>
> I'd saw sqllite isn't a good choice for a server application in any
> event. I'd suggest MySQL as an alternative. To quote the sqllite
> documentation:
>
> "On the other hand, adatabaseengine that uses a server can provide
> better protection from bugs in the client application - stray pointers
> in a client cannot corrupt memory on the server. And because a server
> is a single persistent process, it is able to controldatabaseaccess
> with more precision, allowing for finer grain locking and better
> concurrency."
>
> On Mar 17, 6:32 am, uday kiran <uday.pic...@gmail.com> wrote:
>
>
>
> > Hi folks,
>
> > Im new bie to android.. i want to accessexternaldatabasefrom my
> > android application..
> > I've searched so much time in the internet but could not get exact
> > idea how to implement??
>
> > Please help me If any one is having idea on that and post if u have
> > any code related to it...
>
> > Thanks for the information in advance..
>
> > Cheers
> > Uday- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to