Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is just my opinion, but for question #1, I would recommend just deleting the current records in the DB and then re-insert them upon a successful web call. With the later suggestion, you would have to create a function to loop through all of the current values in the DB, see if they match the new collection (I assume you would have some sort of primary key to make the connection) and then update / remove / add values to your DB which could possibly be numerous calls to your DB unless you create some generic update statement where you build the 'SET / WHERE' clause dynamically as a string and then run the query once.</p> <p>Either way, from an efficiency standpoint, running just a delete and insert query versus a complex matching function plus multiple update / add / delete queries seems the best way to go, again in my opinion.</p> <p>For question #2, you have to build the XML in your code and then post it like these examples:</p> <p><a href="http://www.smnirven.com/?p=15" rel="nofollow">Android Post Example</a></p> <p><a href="http://thinkandroid.wordpress.com/2009/12/31/how-to-do-a-restful-post-call/" rel="nofollow">Another Example</a></p> <p>Or, you could just pass your values via the URL string and then let the server extract those values.</p> <p>For example:</p> <p><code>http://www.example.com/MyWebService.asmx/AddReferrer?variable1=foo&amp;variable2=bar&amp;variable1=foo2&amp;variable2=bar2</code></p> <p>In that example I'm assuming the server is a .net server. In .net I can basically create an array of all of the values for <code>variable1</code> and then loop through them and add them server side to a DB for example.</p> <pre><code>[WebMethod] public string AddReferrer(string[] variable1, string[] variable2) { </code></pre> <p>Hope this helped!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload