×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    53

    How to use a data query

    There is a list box container. On clicking on 'Options' menu, and selecting the 'Search By Category' option, the data query is invoked. Then the search string is passed to a function SearchCat() which takes DesC as a parameter.
    The code has no error, BUT IT SHOWS A USER 11 PANIC. Is there any loss of data happening while transferring the search string??? or what else could be the error???

    TBool CexpListBox2View::HandleSearch_by_CategoryMenuItemSelectedL( TInt aCommand )
    {
    TBuf16<MAX_CAT_STRING_LENGTH> catsearchString;
    if (RunCatPromptL(catsearchString, ETrue, NULL) == EAknSoftkeyOk)
    {
    TBuf16<MAX_CAT_STRING_LENGTH> catsearchString16;
    catsearchString16.Copy(catsearchString);
    iExpListBox2->SearchCatL(catsearchString16);
    }
    }

    void CExpListBox2::SearchCatL(TDesC aSearchString)

    Do i need to load and activate the listbox again when i add elements to be displayed on the list box??? I am retrieving contents from database by matching the search string and appending them to the listbox item array.

    Awaiting your reply. thanx!!!

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: How to use a data query

    Quote Originally Posted by joteddy123 View Post
    void CExpListBox2::SearchCatL(TDesC aSearchString)
    TDesC is a typdefed and it is an abstract class. You should change the signature of your function as follows.
    Code:
    void CExpListBox2::SearchCatL(const TDesC &aSearchString)
    You should read this blog which may clear all your doubts using descriptors. http://descriptors.blogspot.com/

    As far as your actual problem is concerned, i.e USER 11. See what SDK help says about it.
    Quote Originally Posted by SDK help(USER 11 Panic)
    This panic is raised when any operation that moves or copies data to a 16-bit variant descriptor, causes the length of that descriptor to exceed its maximum length.

    It may be caused by any of the copying, appending or formatting member functions and, specifically, by the Insert(), Replace(), Fill(), Fillz() and ZeroTerminate() descriptor member functions. It can also be caused by the SetLength() function. See TDes16.
    Nokia Developer Wiki Moderation team

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    53

    Re: How to use a data query

    thank u!!! that works!!!

Similar Threads

  1. SIP calls over Packet data
    By thefamilyman in forum VoIP
    Replies: 8
    Last Post: 2010-04-27, 06:12
  2. Extracting Data via P2P
    By bladetech69 in forum Near Field Communication
    Replies: 3
    Last Post: 2009-02-17, 11:52
  3. How to display input given to "single-line data query"
    By tlr in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-02-04, 10:13
  4. How to add own icon to data query
    By Peters2 in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2004-11-09, 11:01
  5. cimd tool query for sending binary data
    By patilraghu in forum General Messaging
    Replies: 1
    Last Post: 2002-09-10, 07:09

Posting Permissions

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