0

Just wanted to know if anyone knows of a tutorial on how to create a udf specifically for FB3 or if the process is pretty much the same as FB2.5.

I've been looking online but only can find details for FB2 and I wanted to make sure i wasn't missing anything new that might be available.

As well, is there a way to build UDFs with c# or do I need to do these with either c++ or Delphi?

Any direction would be great, thanks!

Mark Rotteveel
  • 82,132
  • 136
  • 114
  • 158
CSharpNewb
  • 141
  • 1
  • 14

1 Answers1

5

Classic UDFs are the same in Firebird 2 or 2.5 and 3. So any tutorial you'll find is going to work. These UDFs need to be written in native code, so C++, Delphi, etc.

Firebird 3 also adds new type of UDFs called UDR. These are again written in native code, but the interface between Firebird and your code is slightly different. Refreshed.

And finally, thanks to the plugin architecture of Firebird 3, you can write the "UDFs" in C# as well. I wrote a plugin FbNetExternalEngine that does the heavy lifting from native code to .NET/managed world. With that you can write the code in .NET language and call it from SQL the same way the UDFs/UDRs are called. (The v1-final should be available soon.)

cincura.net
  • 4,027
  • 13
  • 37
  • Awesome, thanks Cincura, I'll read your post about your plugin later this evening and try it out. Thanks again for the thorough explanation. – CSharpNewb Jul 16 '17 at 23:45