How to connect to a Remote Database with Webservices?

后端 未结 3 1563
慢半拍i
慢半拍i 2020-12-18 09:13

I have an android APP. I need to connect to a remote D.B. on the internet. All i know is that i have to use a Web Service, installed on the remote DB server.

Whith m

3条回答
  •  别那么骄傲
    2020-12-18 09:54

    This tutorial may help you. I know this works because i used this for an application that i am working on: Try this There are a few errors in the code. I will list the corrections you need to make.

    If you read the comments below you can see where people have found problems with the code, but one i noticed is that there are too many "}" at the end. If you take out one of those "}" it should work fine. I believe the "}" at line 43 can be taken out.

    Also, there is another error that you can fix: Look at line 13, take out "InputStream" in front of "is = entity.getContent();" Now go above the first try{} block and place this declaration: InputStream is;

    That should correct all the problems.

    Let me know how that works out for you. If you have any questions, let me know.

提交回复
热议问题