如何发送大量数据到远程MySQL数据库
我在这里找到(通过 JSON 将数据从 android 发送到服务器 )我可以将本地 Android 数据库数据发送到远程 MySQL 数据库。 因此,我尝试这样做,当我只发送一行时,效果很好,但是当我尝试同步 2 个数据库,将所有行(~200)从本地表发送到远程表时,只存储了几行。
也许Apache服务器无法接收太多请求,但是我需要一次发送一行,等待远程服务器应答,发送下一行,等待服务器应答等等。
如何确保一次发送一个请求并在发送以下请求之前等待服务器答复?
I found here (Send data from android to server via JSON) that I can send local Android database data to a remote MySQL database.
So I tried to do that and when I send just a row it works good, but when I try to sync the 2 databases sending all rows (~200) from a local table to the remote one, just few rows are stored.
Perhaps the Apache server can't receive too much requests, and however I need to send a row at time, wait for the remote server answer, send the following row, wait for the server answer and so on.
How I can be sure to send a request at a time and wait the server answer before sending the following request?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论