Error - Program Closed: _____ Kern Exec o
| Wed, 2007-01-31 18:11 | |
|
|
Hi all, Im trying to write things in my database, but when i Close it, i get an error. Anyone knows what can be? Code: ... _LIT( KRegistroObjetivo , "select %S from %S where %S" ); query.Format( KRegistroObjetivo , &AllCamposObjetivo , &nomeTabela, &linhaSelect ); User::LeaveIfError( viewDados.Prepare( database , TDbQuery( query , EDbCompareNormal ) ) ); User::LeaveIfError( viewDados.EvaluateAll( ) ); viewDados.FirstL(); if( viewDados.AtRow( ) ){ viewDados.UpdateL( ); }else{ viewDados.InsertL( ); } for( viewAllCamp.FirstL( ) ; viewAllCamp.AtRow( ) ; viewAllCamp.NextL( ) ){ TInt numeroCampo; TInt intPosicao = 1; viewAllCamp.GetL( ); numeroCampo = viewAllCamp.ColInt32( 2 ); TPtrC valorCampo; TPtrC nomeCampo; TBuf<2> bufTipo; nomeCampo.Set( viewAllCamp.ColDes( 8 ) ); //nome do campo bufTipo.Copy( viewAllCamp.ColDes( 4 ) ); //tipo do campo valorCampo.Set( Piece( linhaArquivo , numeroCampo , _L( "^" ) ) );//valor na linha de dados TBuf<51> tmpDes; tmpDes.Copy( valorCampo ); if( !bufTipo.Compare( _L( "t" ) ) ){ viewDados.SetColL( numeroCampo , tmpDes ); }else{ TInt tmpInt; TLex valLex( tmpDes ); valLex.Val( tmpInt ); viewDados.SetColL( numeroCampo , tmpInt ); } intPosicao++; } viewDados.PutL( ); ** ERROR HERE ** viewDados.Close( ); viewTab.Close( ); viewCamp.Close( ); viewAllCamp.Close( ); database.Close(); CleanupStack::PopAndDestroy(); fsSession6.Close(); thanks... Developer for PalmOS and Symbian. |






Forum posts: 135
Developer for PalmOS and Symbian.
by Serginho
Forum posts: 7
Forum posts: 135
The problem was at this line:
viewDados.SetColL( numeroCampo , tmpDes );
I tried to Set a Text in a place that was not created. To fix it, I create the DataBase correctly and everything works fine.
Developer for PalmOS and Symbian.
by Serginho
Forum posts: 135
Kern Exec 0 - This panic is raised when the Kernel Executive cannot find an object in the object index for the current process or current thread using the specified object index number (the raw handle number).
Developer for PalmOS and Symbian.
by Serginho