×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2005
    Location
    Helsinki, Finland
    Posts
    257

    DBMS-Table 0 Panic! How to check DBMS Panic reason

    Hello,

    I have 5 columns in my db table as follows:

    TDbCol authorCol(_L("Column_1"), EDbColText);
    TDbCol titleCol(_L("Column_2"), EDbColText, KTitleMaxLength);
    titleCol.iAttributes = TDbCol::ENotNull;

    TDbCol descriptionCol(_L("Column_3"), EDbColLongText);
    TDbCol uidCol(_L("Column_4"), EDbColUint32);
    uidCol.iAttributes = TDbCol::ENotNull;
    TDbCol keyCol(_L("Column_5"), EDbColUint32);
    keyCol.iAttributes = TDbCol::EAutoIncrement;

    Table creation of my db is successful. But the problem arises when I tried to add data in my db. I am doing it as follow:
    RDbTable table;
    TInt err = table.Open(iBookstoreDb, _L("Table_1"), table.EUpdatable);
    User::LeaveIfError(err);

    CDbColSet* booksColSet = table.ColSetL();
    CleanupStack::PushL(booksColSet);

    table.Reset();
    table.InsertL();
    table.SetColL(booksColSet->ColNo(_L("Column_1")), _L("col1")); table.SetColL(booksColSet->ColNo(_L("Column_2")), _L("col2"));

    // Use a stream for the long text column
    RDbColWriteStream writeStream;
    writeStream.OpenLC(table, booksColSet->ColNo(_L("Column_3")));
    writeStream.WriteL(_L("col3"));
    writeStream.Close();
    CleanupStack::Pop();

    CleanupStack::PopAndDestroy(booksColSet);

    TUint number = 100;
    table.SetColL(booksColSet->ColNo(_L("Column_4")), number); // “DBMS-Table 0” PANIC HERE

    table.PutL(); // Complete changes (the insertion)
    table.Close();

    return KErrNone;
    So what is wrong with my code? How I am suppose to check the panic reason? And how should I write date to a column whose date type is TUint? Thanks for any suggestions.
    Last edited by madsum; 2006-03-29 at 07:47.
    Do it now! Today will be yesterday tomorrow - MadSum

  2. #2
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122

    Re: DBMS-Table 0 Panic! How to check DBMS Panic reason

    DBMS-Table 0 means the column number is not valid. It seems to be because you PopAndDestroy() your booksColSet and still use it afterwards.

    Lauri

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Helsinki, Finland
    Posts
    257

    Re: DBMS-Table 0 Panic! How to check DBMS Panic reason

    Well, it's a typo. I have at as follows in my code:

    table.SetColL(booksColSet->ColNo(_L("Column_4")), 100); // col = 4

    CleanupStack::PopAndDestroy(booksColSet);

    table.PutL(); // Complete changes (the insertion)
    table.Close();

    By the way, I could not see any panic reason in my api reference for DBMS-Table panic. So where did you get it?
    Do it now! Today will be yesterday tomorrow - MadSum

  4. #4
    Registered User
    Join Date
    Apr 2006
    Posts
    44

    Re: DBMS-Table 0 Panic! How to check DBMS Panic reason


  5. #5
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    79

    Question Re: DBMS-Table 0 Panic! How to check DBMS Panic reason

    Quote Originally Posted by laa-laa View Post
    DBMS-Table 0 means the column number is not valid. It seems to be because you PopAndDestroy() your booksColSet and still use it afterwards.

    Lauri
    Hi
    When i launching the emulator it shows DBMS Table 0 panic. i am new to symbian.first time i am handling DBMS.Please help me any one. It is urgent.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: DBMS-Table 0 Panic! How to check DBMS Panic reason

    You may consider showing some code.

Similar Threads

  1. about panic reason and panic code
    By turnabull2 in forum Symbian
    Replies: 1
    Last Post: 2006-01-26, 12:21
  2. Replies: 0
    Last Post: 2005-07-04, 11:08
  3. DBMS Insert panic error
    By zerglim in forum Symbian
    Replies: 3
    Last Post: 2004-07-23, 05:38
  4. Access Denied Error and a DBMS 2 Panic
    By kiranpuranik in forum Symbian
    Replies: 0
    Last Post: 2004-05-13, 11:18
  5. Where is the reason code for a Panic shown?
    By edelsesto in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-07-02, 01:28

Posting Permissions

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