UDFs?

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Aggie85
Posts: 85
Joined: Wed 11 Nov 2015 17:03

UDFs?

Post by 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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: UDFs?

Post by 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.

MaximG
Devart Team
Posts: 1019
Joined: Mon 06 Jul 2015 11:34

Re: UDFs?

Post by 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.

Aggie85
Posts: 85
Joined: Wed 11 Nov 2015 17:03

Re: UDFs?

Post by 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

ViktorV
Devart Team
Posts: 2299
Joined: Wed 30 Jul 2014 07:16

Re: UDFs?

Post by 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.

Post Reply