Page 1 of 1

own function

Posted: 06.03.2007, 06:03
by folibis
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 ...

Posted: 07.03.2007, 02:00
by folibis
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 :(

Posted: 22.03.2007, 22:54
by aducom
Have you tried the syntax on sqlite3.exe?