Page 1 of 1
UDFs?
Posted: Mon 29 May 2017 15:51
by Aggie85
Howdy!
I believe I have FINALLY found a product (TVirtualQuery) that can replace TxQuery I have been using for the past 15 years or so!!
TxQuery allows UDFs (User Defined Functions) via some events that get called if the parser finds a function that can't be resolved.
Is there a way to do this with TVirtualQuery?
Thanks in advance!
Aggie85
Re: UDFs?
Posted: Tue 30 May 2017 07:31
by AlexP
Hello,
No, such feature is not supported yet. Maybe,we will implement UDFs in one of the next versions.
Re: UDFs?
Posted: Wed 16 Aug 2017 13:11
by MaximG
We implemented the possibility of using UDF when working with VirtualQuery. To register a custom function, use the OnRegisterFunctions event:
Code: Select all
FunctionManager.RegisterFunction('MyFunction', 1, MyFirstFunction);
After implementing the MyFirstFunction fuction, for example as follows :
Code: Select all
function MyFirstFunction(MyValue: array of Variant): Variant;
begin
case VarType(MyValue[0]) of
varString: result:= 'MyFirstResult';
end;
end;
You can use the function with the 'MyFunction' name in SQL query text.
Re: UDFs?
Posted: Thu 17 Aug 2017 02:09
by Aggie85
Howdy Maxim!
That is GREAT news! I really appreciate it!
The last nightly build of VirtualDAC you sent me is working very well in my testing so far. I have only found one problem with TkbmMemTable but it goes away if I copy the TkbmMemTable to a TVirtualTable. I will try and see if I can reproduce the problem when I am done testing all my TVirtualQuery additions to my program.
Again, I really appreciate y'alls great support.
All the best,
Aggie85
Re: UDFs?
Posted: Tue 22 Aug 2017 09:21
by ViktorV
Thank you for the interest in our products.
Please contact us if you have any questions about our products.