×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    9

    Unhappy writing datachunk

    im writing datachunk to the file inthe following code,it correctly writes file to C:.But program gives me error e32base -cbase 31 error what does it mean


    one more query after tried to write a wav file but now it gives me error -191
    after this my program also not to the txt file giving same error -191









    // Get the body data supplier
    MHTTPDataSupplier* body = aTransaction.Response().Body();
    TPtrC8 dataChunk;

    // GetNextDataPart() returns ETrue, if the received part is the last
    // one.
    TBool isLast = body->GetNextDataPart(dataChunk);
    iObserver.ClientBodyReceived(dataChunk);
    RFs aFs;
    User::LeaveIfError(aFs.Connect());
    CleanupClosePushL(aFs);

    _LIT(KStreamName, "C:\\Stream.txt");


    //Delete old file
    aFs.Delete(KStreamName);
    //
    // Open a file write stream
    RFileWriteStream fWrite;
    User::LeaveIfError(fWrite.Create(aFs, KStreamName, EFileWrite));
    CleanupClosePushL(fWrite);

    //
    // Write to the stream and commit it

    fWrite<<dataChunk;



    TBuf<64> text;
    _LIT(KBodyPartReceived, "%d bytes received... ");
    text.Format(KBodyPartReceived, dataChunk.Length());
    iObserver.ClientEvent(text);

    // NOTE: isLast may not be ETrue even if last data part received.
    // (e.g. multipart response without content length field)
    // Use EResponseComplete to reliably determine when body is completely
    // received.
    if (isLast)
    {
    _LIT(KBodyReceived,"Body received");
    iObserver.ClientEvent(KBodyReceived);
    }

    // Always remember to release the body data.
    body->ReleaseData();
    fWrite.CommitL();

  2. #2
    Regular Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, Great Britain
    Posts
    98

    Re: writing datachunk

    Are you sure that the CBase error code is 31? The documentation doesn't seem to mention that, jumping from 30 to 33. It would help to know exactly what's happening in your program when you get that.

    The -191 error is easier to find, that seems to be "KErrHostUnreach -191 Could not connect to the specified server " according to the excellent guide at www.newlc.com. Again, knowing exactly where it is giving this message would be useful.

Similar Threads

  1. URGENT .. writing a recognizer
    By Devang Shah in forum Symbian
    Replies: 0
    Last Post: 2005-06-15, 18:53
  2. File Writing Problem
    By _nomad_ in forum Symbian
    Replies: 2
    Last Post: 2005-04-19, 10:29
  3. Nokia Digital Pen SU-1B Writing Smudge
    By pramod.sharma in forum General Messaging
    Replies: 0
    Last Post: 2004-10-23, 15:23
  4. Writing to the Gallery
    By Turkey_Boy in forum Mobile Java General
    Replies: 1
    Last Post: 2003-11-10, 13:40
  5. Writing to the Gallery
    By Turkey_Boy in forum Mobile Java General
    Replies: 2
    Last Post: 2003-11-08, 14:23

Posting Permissions

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