Error - Program Closed: _____ Kern Exec o

Login to reply to this topic.
Wed, 2007-01-31 18:11
Joined: 2006-12-12
Forum posts: 135
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.

by Serginho


Wed, 2007-01-31 21:07
Joined: 2006-12-12
Forum posts: 135
Re: Error - Program Closed: _____ Kern Exec o
Problem solved.

Developer for PalmOS and Symbian.

by Serginho

Thu, 2007-02-01 02:47
Joined: 2006-02-17
Forum posts: 7
Re: Error - Program Closed: _____ Kern Exec o
It's always nice when people write how they solve a particular problem Smiley
Thu, 2007-02-01 18:59
Joined: 2006-12-12
Forum posts: 135
Re: Error - Program Closed: _____ Kern Exec o
Sorry,

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.

Smiley

Developer for PalmOS and Symbian.

by Serginho

Thu, 2007-02-01 19:02
Joined: 2006-12-12
Forum posts: 135
Re: Error - Program Closed: _____ Kern Exec o
One more thing...

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

  • Login to reply to this topic.