Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 22nd, 2003, 10:30 PM
Tatsu Tatsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 11 Tatsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Firebird UDF

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.

Reply With Quote
  #2  
Old December 23rd, 2003, 04:45 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
Quote:
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.)

What do you mean, "recognized"?

Firebird should process this just fine and any client component should ignore this completely.
Quote:
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?

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

Reply With Quote
  #3  
Old December 23rd, 2003, 08:38 AM
Tatsu Tatsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 11 Tatsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old December 23rd, 2003, 08:48 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
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?

Reply With Quote
  #5  
Old December 23rd, 2003, 08:58 AM
Tatsu Tatsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 11 Tatsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old December 23rd, 2003, 09:04 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
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.

Reply With Quote
  #7  
Old December 23rd, 2003, 09:21 AM
Tatsu Tatsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 11 Tatsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #8  
Old December 23rd, 2003, 09:26 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
And that particular statement does work in IBConsole?

'Cause if so, then I have no other ideas.

Reply With Quote
  #9  
Old December 23rd, 2003, 09:29 AM
Tatsu Tatsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 11 Tatsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I note your advice. Thanks anyway. regards,

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Firebird UDF


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT