|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Does someone let me know answers to the following problems
on UDF? 1. When specifying a UDF in a SQL sentence in TSQLClientDataSet property of CommandText, I find that the TSQLClientDataSet object does not recognize the UDF. How can I make it recognize the UDF from a Firebird Client application using the object? ( IBConsole surely recognizes the UDF.) 2. When deleting a UDF alias from RDB$FUNCTIONS, I find that the same alias can no longer be registered with Firebird. How can I? Or, how can I refer to or delete the UDF alias registration record? Kindly let me know. |
|
#2
|
||||
|
||||
|
Quote:
What do you mean, "recognized"? Firebird should process this just fine and any client component should ignore this completely. Quote:
Don't delete anything from the system tables! Use the "DROP EXTERNAL FUNCTION <function_name>" statement.
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
|
#3
|
|||
|
|||
|
Firebird UDF
Thanks a lot for the quick advice.
By "does not recognize", I mean that when setting the TSQLClientDataSet property of Active to "true", I get a complier error message of message of "Function unknown my own udf name>. That is, I first input an SQL statement such as "SELECT SERIAL, MyUDF( SOME_FIELD ) FROM MYTABLE" in the CommandText and then set the active property to TRUE then I get the above mentioned error message from the compiler. A further advice would be appreciated. Awaiting your reply, As for the UDF function alias deletion from the system table, I thank you for your advice. |
|
#4
|
|||
|
|||
|
Hi,
If you get "function unknown", then the error comes straight from Firebird. Does the statement with another Firebird tool? If so, did you "commit" after the DECLARE? |
|
#5
|
|||
|
|||
|
Firebird UDF
Thank you for the quick advice again! Amazing!
I made the following "DECLARE" statement. declare external function MYUDF int, cstring(32) returns parameter 2 entry_point 'MYFUNCTIONFB' module_name 'MYUDF.dll'; commit; Any errors? I await your advice. Incidentally, as I wrote first, IBConsole certainly processes this UDF of mine just fine and IBConsole returns my intended results. |
|
#6
|
|||
|
|||
|
Can you write:
SELECT SERIAL, MYUDF( SOME_FIELD ) FROM MYTABLE In the .CommandText property? It _might_ be that the dbExpress driver is putting double quotes around object names. |
|
#7
|
|||
|
|||
|
Thanks all the time, Mr. Tonies,
I may have confused you, I put the double quotes enclosing my SQL statement just to make the statement outstanding. I actually input my SQL statement just you advise me to, i.e. SELECT SERIAL, MYUDF( SOME_FIELD ) FROM MYTABLE in the .CommandText properly of TSQLCLientDataSet. I did as you suggest again, just in case, but to no avail. Can you come up with any other possible causes? Awaiting your advice. |
|
#8
|
|||
|
|||
|
And that particular statement does work in IBConsole?
'Cause if so, then I have no other ideas. |
|
#9
|
|||
|
|||
|
I note your advice. Thanks anyway. regards,
|
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Firebird UDF |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|