[SQLite3] User Defined functions - not an error
Posted: Wed 06 Jul 2011 12:22
Hi!
I use UniDAC 3.70.0.18 , RAD STUDIO C++ BUILDER XE and SQLite3 ver. 3.7.7.1
After executing my UDF function I get an sqlite3 error: "not an error.", but when I use previous version of sqlite3 (3.7.6) everything is ok. Example:
And then after executing : SELECT _NETTO(100,23); I get this error :/
Can You help me?
I use UniDAC 3.70.0.18 , RAD STUDIO C++ BUILDER XE and SQLite3 ver. 3.7.7.1
After executing my UDF function I get an sqlite3 error: "not an error.", but when I use previous version of sqlite3 (3.7.6) everything is ok. Example:
Code: Select all
double __fastcall Netto(double br,double v) // oblicza Netto z brutto i vat
{
if((double((100 * br)/(100+v)*100)/100) != NULL)
return double((100 * br)/(100+v)*100)/100;
else
return 0;
}
...
Variant __fastcall __NETTO(Variant *Vect, const int ivSize)
{
return Variant(Netto(Vect[0],Vect[1]));
}
...
void __fastcall TdMod::ConnectionAfterConnect(TObject *Sender)
{
TLiteUtils::RegisterFunction(Connection,"_NETTO",2,__NETTO);
...
}
Can You help me?