UDFs?

UDFs?

Postby Aggie85 » Mon 29 May 2017 15:51

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
Aggie85
 
Posts: 66
Joined: Wed 11 Nov 2015 17:03

Re: UDFs?

Postby AlexP » Tue 30 May 2017 07:31

Hello,

No, such feature is not supported yet. Maybe,we will implement UDFs in one of the next versions.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

Re: UDFs?

Postby MaximG » Wed 16 Aug 2017 13:11

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.
MaximG
Devart Team
 
Posts: 737
Joined: Mon 06 Jul 2015 11:34

Re: UDFs?

Postby Aggie85 » Thu 17 Aug 2017 02:09

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
Aggie85
 
Posts: 66
Joined: Wed 11 Nov 2015 17:03

Re: UDFs?

Postby ViktorV » Tue 22 Aug 2017 09:21

Thank you for the interest in our products.
Please contact us if you have any questions about our products.
ViktorV
Devart Team
 
Posts: 1867
Joined: Wed 30 Jul 2014 07:16


Return to VirtualDAC