locked
Webservice for Win8 to Upload and pull data RRS feed

  • Question

  • I am not sure how to go about handling this task of uploading data.

     I have a WinRT App showing  data in multiple rows as below :

       Item-name    Qty     
        apple           100    
        Orange         200
       ..                   .....

    1) I need help on webservice (soap , wcf, Rest ) that handle this task of uploading data back to server and inserting data into database. Any reference link or sample webservice is greatly appreciated. Which type of webservice should use?

    2) When uploading the data back to server to be inserted into Database, what approach the webservice should take?

    Upload one row at a time or upload in a loop for all the row ? What if there is a bad connection during the operation, how do I make sure everything is ok or there is no miss out?


    Thanks

    Tuesday, August 6, 2013 2:02 PM

Answers

  • Hi Machine7,

    Let me try to answer your question and if there is some misunderstanding, correct me please.

    1, While using the webservice, you may get some idea from Matt's blog: http://blogs.msdn.com/b/wsdevsol/archive/2012/12/21/help-me-how-do-i-connect-to-an-asmx-web-service.aspx This is a short tutorial for you to learn how to use webservice base on ASMX.

    2, I'm not quite understand what you mean by "uploading the data back to server", can you clarify it for me? After uploading the data to the server side, some coding work on the server side is necessary to insert data into database.

    3, while uploading something by using BackgroundTask, you may know the progress and completion, here is the explaination for you: http://msdn.microsoft.com/en-US/library/windows/apps/hh977054. So if a bad connection situation happens, you can be noticed by the progress or the completion status.

    If there is something unclear, we are willing to help.

    Best Regards,

    • Marked as answer by Anne Jing Tuesday, August 13, 2013 1:19 PM
    Wednesday, August 7, 2013 9:38 AM

All replies

  • Hi Machine7,

    Let me try to answer your question and if there is some misunderstanding, correct me please.

    1, While using the webservice, you may get some idea from Matt's blog: http://blogs.msdn.com/b/wsdevsol/archive/2012/12/21/help-me-how-do-i-connect-to-an-asmx-web-service.aspx This is a short tutorial for you to learn how to use webservice base on ASMX.

    2, I'm not quite understand what you mean by "uploading the data back to server", can you clarify it for me? After uploading the data to the server side, some coding work on the server side is necessary to insert data into database.

    3, while uploading something by using BackgroundTask, you may know the progress and completion, here is the explaination for you: http://msdn.microsoft.com/en-US/library/windows/apps/hh977054. So if a bad connection situation happens, you can be noticed by the progress or the completion status.

    If there is something unclear, we are willing to help.

    Best Regards,

    • Marked as answer by Anne Jing Tuesday, August 13, 2013 1:19 PM
    Wednesday, August 7, 2013 9:38 AM
  • Hi Anne Jing,

    I am trying to create a winRT app that works like stock-take inventory management application.

    This App will show multiples rows for user to enter quantity and click btnSubmit once data entry completed.

        Item-name    Qty     
        apple           100    
        Orange         200
        ..                   .....

       btnSubmit

    My questions are  on a Web service which will take paramaters( Item-name, Qty) and insert them into tables of Ms SqlServer :

    1) What will be best approach to send data from the multiple rows (ie, 10 rows of data) using Webservice?

    should I use a Loop to iterate all the rows ( Ie. 10 rows ) when user click btnSubmit or send data one row at a time  with consideration of disruption of connection in mobile network?

    2) How to handle the power failure or sudden disconnect issue so that there is no error on Sql Server such as double entry or miss item.

    3) Which type of webservice is best for this scenario ( Wcf, Rest or Soap webservice) so I can create one.

    4) sorry for the confusion for this term "Uploading", I should say use webservice to send data back to Back end server.

    Thanks

    Wednesday, August 7, 2013 10:43 AM
  • Hi,Machine7

    You can refer to that link I give you in my first reply.I think these link can mainly solve your question.If you have any problems about these link,we are willing to help!

    Thursday, August 8, 2013 6:41 AM