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
UDFs?
Re: UDFs?
We implemented the possibility of using UDF when working with VirtualQuery. To register a custom function, use the OnRegisterFunctions event:
After implementing the MyFirstFunction fuction, for example as follows :
You can use the function with the 'MyFunction' name in SQL query text.
Code: Select all
FunctionManager.RegisterFunction('MyFunction', 1, MyFirstFunction);
Code: Select all
function MyFirstFunction(MyValue: array of Variant): Variant;
begin
case VarType(MyValue[0]) of
varString: result:= 'MyFirstResult';
end;
end;
Re: UDFs?
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
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