own function

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
folibis
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 06.03.2007, 05:57

own function

Post 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 ...
folibis
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 06.03.2007, 05:57

Post 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 :(
aducom
Zeos Dev Team
Zeos Dev Team
Posts: 67
Joined: 30.08.2005, 13:21

Post by aducom »

Have you tried the syntax on sqlite3.exe?
Post Reply