Página 1 de 1

Can I use C API function of Sqlite in our Code

Publicado: Sab Oct 17, 2015 10:42 am
por Milan Mehta
Can I use C API function of Sqlite in our code like sqlite3_finalize() ?
TIA
Milan.

Re: Can I use C API function of Sqlite in our Code

Publicado: Dom Oct 18, 2015 6:21 pm
por ignacio
Hello,

Yes, you can use any C function but you must create the wrapper for it. Fortunatelly that function is already available a the high level on this reserved method:

TMYSQDATASOURCE. SQLFinalize( hQuery )

BTW, here is the code:

Código: Seleccionar todo

XA_FUNC( XSQLITEDATASOURCE_FINALIZE )
{
   sqlite3_stmt *hQuery = (LPVOID) hb_parnl( 1 );

   if( hQuery )
      hb_retnl( sqlite3_finalize( hQuery ) );
   else
      hb_retnl( 0 );
}
Regards,