×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    how to send data to server continuously?

    hi all

    I use httppost to send one data well.

    now I want to know how to send records continuously and delete after current record succeed?

    because every time we send succeed, it return body in ClientBodyReceived.

    but i don't know my current record id?

    pplz help.

    thanks.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: how to send data to server continuously?

    Can you send the current record ID with the data, and make the server to respond wih that same infomration ? after all it is your own service..

  3. #3
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    Re: how to send data to server continuously?

    thanks for good idea.

    but how to send data continuously ?

    i test 5 record , it only send first record.

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: how to send data to server continuously?

    I suppose it is your logic, so you would actually need to debug the code and see where your logic is failing..

  5. #5
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    Re: how to send data to server continuously?

    here is my code :
    :Upload()
    {
    CDesCArrayFlat* alist
    ........
    for(TInt i=0; i<alist->MdcaCount(); i++)
    {
    sourceRow.Set(alist->MdcaPoint(i));
    TPtrC sTmp, sAutoID , sUID , sPWD ;
    startPos = sourceRow.Locate('|') + 1; // exclude '|' from result
    endPos = sourceRow.LocateReverse('|');
    sAutoID.Set(sourceRow.Left(startPos-1));

    sTmp.Set(sourceRow.Mid(startPos, endPos-startPos));
    startPos = sTmp.Locate('|') + 1; // exclude '|' from result
    endPos = sTmp.LocateReverse('|');//
    sUID.Set(sTmp.Left(startPos-1));

    sTmp.Set(sTmp.Mid(startPos, endPos-startPos));
    startPos = sTmp.Locate('|') + 1;
    endPos = sTmp.LocateReverse('|');//
    sPWD.Set(sTmp.Left(startPos-1));



    //upload current record
    TBool ulo = ETrue;
    ulo = UploadOne( sUID , sPWD );

    }
    }
    :UploadOne(TDes& aUID , TDes& aPWD )
    {
    ....
    TRAPD(err,iWebClient->IssueHTTPPostL(uri8, KMimeType, ptrT));
    .....
    }

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: how to send data to server continuously?

    You should not use for loop, you should actually wait untill you get reply for the send, and only after that do a next round.

  7. #7
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    Re: how to send data to server continuously?

    that is the question.

    how to do?

    plz help.

    thanks.

  8. #8
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: how to send data to server continuously?

    Check the HTTP examples callback which is telling you what is happening with the HTTP query, and see what event is generated when you are getting the reply,and make a logic that starts a new request right after you have finished the previous one..

Similar Threads

  1. Any HTTP API available to send data to a server
    By ms_sarwar1 in forum Symbian
    Replies: 3
    Last Post: 2009-09-04, 11:30
  2. Threading:variable time in getting data from server
    By jaakkie in forum Mobile Java General
    Replies: 5
    Last Post: 2009-02-18, 11:16
  3. why cant we send the data again to the server once the DataOutputStream is flush ed
    By arungupta_2jan in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2008-08-11, 17:58
  4. How to send Content type to send data to server
    By Basu in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-10-23, 02:19
  5. Socket to server web, send a recive data;
    By maxsoftnokia in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-07-16, 16:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •