×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Unhappy give me solution of one panic error E32USER-CBase 90

    my code is:

    void CBookDb::CreateBooksTableL()
    {
    // Specify columns for Books table
    TInt TotName = iAppUi->TotColName();

    // for store Data/Value.
    iColName = new (ELeave) CDesCArrayFlat(1);
    iDataType = new (ELeave) CDesCArrayFlat(1);
    iMaxLength = new CArrayFixFlat<TInt>(1);
    iAutoIncrement = new (ELeave) CDesCArrayFlat(1);
    iIndexName = new (ELeave) CDesCArrayFlat(1);
    iPrimaryKey = new (ELeave) CDesCArrayFlat(1);

    CDbColSet* bookColSet = CDbColSet::NewLC();
    CDbKey* indexKey = CDbKey::NewLC(); // create index key set
    for( ix=0 ; ix<TotName ; ix++ )
    {
    iColName = iAppUi->ColumnName( ix );
    iDataType = iAppUi->DataType( ix );
    iMaxLength = iAppUi->MaxLength( ix );
    iAutoIncrement = iAppUi->AutoIncrement( ix );
    iIndexName = iAppUi->IndexName( ix );
    iPrimaryKey = iAppUi->PrimaryKey( ix );

    //TPtrC data = iColName->MdcaPoint( ix );
    TPtrC type = iDataType->MdcaPoint( ix );
    TPtrC autoincre = iAutoIncrement->MdcaPoint( ix );
    TPtrC indexName = iIndexName->MdcaPoint( ix );
    TPtrC primkey = iPrimaryKey->MdcaPoint( ix );

    iName.Copy( (*iColName)[ix] );
    iType.Copy( (*iDataType)[ix] );
    iAutoincre.Copy( (*iAutoIncrement)[ix] );
    iIndex.Copy( (*iIndexName)[ix] );

    TInt totmax = (*iMaxLength)[ix]; TInt totauto = autoincre.Length();
    TInt totindex = indexName.Length();
    TInt totprikey = primkey.Length();

    _LIT(KCounterType, "Counter");
    _LIT(KBooleanType, "Boolean");
    _LIT(KTextType, "Text");
    _LIT(KLongType, "Long");
    _LIT(KSignedInteger, "Signed Integer");
    _LIT(KUnsignedInteger, "Unsigned Integer");
    _LIT(KFloatingPoint, "Floating Point");
    _LIT(KDateTime, "Date Time");

    if( type.operator == (KCounterType) ) // Counter
    {
    if( totauto <= 0 && totprikey <= 0 )
    {
    TDbCol CounterCol( iName, EDbColUint32 );
    bookColSet->AddL(CounterCol);
    }
    else if( totauto > 0 && totprikey <= 0 )
    {
    TDbCol CounterCol( iName, EDbColUint32 );
    CounterCol.iAttributes = TDbCol::EAutoIncrement;
    bookColSet->AddL( CounterCol );
    }
    else if( totauto <= 0 && totprikey > 0 )
    {
    TDbCol CounterCol( iName, EDbColUint32 );
    CounterCol.iAttributes = TDbCol::ENotNull;
    bookColSet->AddL( CounterCol );
    }
    else if( totauto > 0 && totprikey > 0 )
    {
    TDbCol CounterCol( iName, EDbColUint32 );
    CounterCol.iAttributes = TDbCol::EAutoIncrement;
    CounterCol.iAttributes = TDbCol::ENotNull;
    bookColSet->AddL( CounterCol );
    }
    }
    if( type.operator == ( KBooleanType ) ) // Boolean
    {
    TDbCol BooleanCol( iName, EDbColBit );
    bookColSet->AddL( BooleanCol );
    }
    if( type.operator == ( KTextType ) ) // Text
    {
    if( totmax <= 0 )
    {
    TDbCol TextCol( iName, EDbColText );
    bookColSet->AddL( TextCol );
    }
    else
    {
    /*TDbCol TextCol;
    TextCol.iName = iName;
    TextCol.iType = EDbColText;*/
    TDbCol TextCol( iName, EDbColText, totmax );
    bookColSet->AddL( TextCol );


    }

    }
    if( type.operator == ( KSignedInteger ) ) // Signed Integer
    {
    if ( totauto <= 0 && totmax <= 0 ) {
    TDbCol IntegerCol( iName, EDbColInt32 );
    bookColSet->AddL( IntegerCol );
    }
    else if ( totauto <= 0 && totmax > 0 ) {
    TDbCol IntegerCol( iName, EDbColInt32, totmax );
    bookColSet->AddL( IntegerCol );
    }
    else if ( totauto > 0 && totmax >= 0 {
    TDbCol IntegerCol( iName, EDbColInt32 );
    IntegerCol.iAttributes = TDbCol::EAutoIncrement;
    bookColSet->AddL( IntegerCol );
    }
    else if ( totauto > 0 && totmax > 0 ) {
    TDbCol IntegerCol( iName, EDbColInt32, totmax );
    IntegerCol.iAttributes = TDbCol::EAutoIncrement;
    bookColSet->AddL( IntegerCol );
    }
    }
    if( type.operator == ( KDateTime ) )
    {
    TDbCol DateTimeCol( iName, EDbColDateTime );
    bookColSet->AddL( DateTimeCol );
    }
    }
    // Create the Books table
    iTbName = iAppUi->TableName();
    TInt err = iBookDb.CreateTable(iTbName, *bookColSet);
    CleanupStack::PopAndDestroy( bookColSet ); <<==== Here raise error
    }

    if any body know that above problems solution that please give me reply.
    Last edited by Tanya; 2007-03-28 at 11:40.

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

    Re: give me solution of one panic error E32USER-CBase 90

    Quote Originally Posted by Tanya
    CleanupStack::PopAndDestroy( bookColSet ); <<==== Here raise error}

    if any body know that above problems solution that please give me reply.

    E32USER-CBase 90
    Introduced in 6.0: The panic is raised as a result of a call to the Pop() and PopAndDestroy() static member functions of the CleanupStack class. The panic occurs when an the item to be popped is not the expected item.
    EDIT: Missed out!!!
    Kiran.
    Last edited by kiran10182; 2007-03-28 at 11:49.

  3. #3
    Registered User
    Join Date
    Feb 2007
    Posts
    32

    Re: give me solution of one panic error E32USER-CBase 90

    You have pushed indexKey to stack on top of bookColSet and now you are trying to pop bookColSet under it. You have to first pop indexKey from stack.

    - Mika

  4. #4
    Regular Contributor
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    103

    Re: give me solution of one panic error E32USER-CBase 90

    Hi
    here is the SDK description for E32User CBase 90 panic

    The panic is raised as a result of a call to the Pop() and PopAndDestroy() static member functions of the CleanupStack class. The panic occurs when an the item to be popped is not the expected item.
    Code:
     CDbColSet* bookColSet = CDbColSet::NewLC();
    CDbKey* indexKey = CDbKey::NewLC(); // create index key set
    here you have pushed two objects on to the stack. So you will have to pop it like
    Code:
    CleanupStack::PopAndDestroy( indexKey );
    CleanupStack::PopAndDestroy( bookColSet );
    Keep in mind that the order of popping is crucial..

    hope this help
    regards
    Rafeeq

  5. #5
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: give me solution of one panic error E32USER-CBase 90

    i done now it give me error -28.

    iTbName = iAppUi->TableName();
    TInt err = iBookDb.CreateTable(iTbName, *bookColSet);
    TInt error = iBookDb.CreateIndex( iIndex, iTbName, *indexKey ); give error -28.
    if ( TInt x = 0)
    {
    TInt y = 1;
    }
    CleanupStack::PopAndDestroy( indexKey );
    CleanupStack::PopAndDestroy( bookColSet );



    Regards Tanya
    Last edited by Tanya; 2007-03-28 at 12:18.

  6. #6
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: give me solution of one panic error E32USER-CBase 90

    try the following code i hope this will work fine for you. i have no problem with the following code;

    const int KTitleMaxLength = 60;
    _LIT(KBooksTable, "Books");
    _LIT(KBooksAuthorCol, "Author");
    _LIT(KBooksTitleCol, "Title");
    _LIT(KBooksDescriptionCol, "Description");

    // Specify columns for Books table
    TDbCol authorCol(KBooksAuthorCol, EDbColText); // Default length
    TDbCol titleCol(KBooksTitleCol, EDbColText, KTitleMaxLength);
    titleCol.iAttributes = TDbCol::ENotNull;

    // Stream Data
    TDbCol descriptionCol(KBooksDescriptionCol, EDbColLongText);

    // Create columnset
    CDbColSet* bookColSet = CDbColSet::NewLC();
    bookColSet->AddL(authorCol);
    bookColSet->AddL(titleCol);
    bookColSet->AddL(descriptionCol);

    // Create the Books table
    User::LeaveIfError(iBookstoreDb.CreateTable(KBooksTable,
    *bookColSet));
    CleanupStack::PopAndDestroy(bookColSet);

    regrads,
    kkrish
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  7. #7
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: give me solution of one panic error E32USER-CBase 90

    Thank you

    But i know that it is example of DBMS example in symbian s60x but in my application need to little bit different logic.

  8. #8
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: give me solution of one panic error E32USER-CBase 90

    error is just because of
    1. your table is not created.
    2. table name and index name you are given is wrong.

    because -28 refers to bad name.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

Similar Threads

  1. Using Bluetooth serial port in MIDlets (nokia 9500 issue)
    By orsteglasy in forum Mobile Java Networking & Messaging & Security
    Replies: 11
    Last Post: 2007-10-07, 21:49
  2. CEikProgressInfo & PANIC when setting wrong width and final val
    By eekisa in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-01-05, 13:26
  3. someone give me a solution
    By kgvb in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-03-17, 06:22
  4. Need help for testing nokia solution
    By exosystem in forum General Development Questions
    Replies: 0
    Last Post: 2003-08-21, 17:27
  5. CBase panic 46
    By paulsanbu in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2002-12-02, 07:00

Posting Permissions

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