How can I create my own function with ZEOS and Builder C++?
I mean how to access sqlite function "sqlite3_create_function"? I need sqlite handle for it ...
own function
Moderators: gto, cipto_kh, EgonHugeist
Ok, I've found a way to do that
[code]
void func(void * p,int n,char ** pp)
{
}
IZSQLiteConnection * sqliteConn = NULL;
ZConnection1->DbcConnection->QueryInterface(&sqliteConn);
sqliteConn>GetPlainDriver()>CreateFunction(sqliteConn>GetConnectionHandle(),"IDENT_CURRENT",1,func,NULL);
sqliteQuery->SQL->Text = "select IDENT_CURRENT('table_name')";
sqliteQuery->Open();
[/code]
but anyway I got sql error :(
[code]
void func(void * p,int n,char ** pp)
{
}
IZSQLiteConnection * sqliteConn = NULL;
ZConnection1->DbcConnection->QueryInterface(&sqliteConn);
sqliteConn>GetPlainDriver()>CreateFunction(sqliteConn>GetConnectionHandle(),"IDENT_CURRENT",1,func,NULL);
sqliteQuery->SQL->Text = "select IDENT_CURRENT('table_name')";
sqliteQuery->Open();
[/code]
but anyway I got sql error :(