DBMS-Table 0 Panic! How to check DBMS Panic reason
| Wed, 2006-03-29 08:17 | |
|
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: Quote RDbTable table; 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.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; |
|





