If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Cannot overload StatPrint

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-08-03, 12:40
eamonnthedub eamonnthedub is offline
Registered User
 
Join Date: Oct 2003
Location: Dublin
Posts: 2
Cannot overload StatPrint

Any help on the problems below would be greatly appreciated :

Problem 1:
------------
When BladeSmith is used to create a UDT and I activate statistics functions, only StatCollect is installed. When I then try to add StatPrint seperately I get a message saying that a Routine with this signature exists.

I can get around this by adding StatPrint into the objects.sql directly for the moment but that's not ideal.

Is this a known bug with BladeSmith? BTW I'm running BladeSmith v4.00.TC3.

Problem 2:
------------
I've added StatPrint into objects.sql and written a C function to implement StatPrint for my specific UDT.
I've tried :
lvarchar StatPrint(void* dummy, lvarchar stat) -- as per example supplied
lvarchar StatPrint(UDT* dummy_udt, lvarchar stat) -- because this made more sense to me.


When I populate a table with some UDT values and run "update statistics high" this is successful i.e. picks up overloaded StatCollect

When I then try "dbschema -d my_db -hd udt_table" I get
"-937 - User Defined Routine error."

I'm 99.9% sure this error is not coming from my overloaded "StatPrint" function as this is the same error I was getting prior to writting the "StatPrint" function.
Reply With Quote
  #2 (permalink)  
Old 10-30-03, 09:44
eamonnthedub eamonnthedub is offline
Registered User
 
Join Date: Oct 2003
Location: Dublin
Posts: 2
Cool Re: Cannot overload StatPrint

If anyone's interested I've managed to fix this problem myself. The prototype in the objects.sql file for the StatPrint and StatCollect UDRs was incorrect.

Should have been :

"StatCollect (a_number,float,float) returns stat"
"StatPrint (a_number,stat) returns lvarchar"



Quote:
Originally posted by eamonnthedub
Any help on the problems below would be greatly appreciated :

Problem 1:
------------
When BladeSmith is used to create a UDT and I activate statistics functions, only StatCollect is installed. When I then try to add StatPrint seperately I get a message saying that a Routine with this signature exists.

I can get around this by adding StatPrint into the objects.sql directly for the moment but that's not ideal.

Is this a known bug with BladeSmith? BTW I'm running BladeSmith v4.00.TC3.

Problem 2:
------------
I've added StatPrint into objects.sql and written a C function to implement StatPrint for my specific UDT.
I've tried :
lvarchar StatPrint(void* dummy, lvarchar stat) -- as per example supplied
lvarchar StatPrint(UDT* dummy_udt, lvarchar stat) -- because this made more sense to me.


When I populate a table with some UDT values and run "update statistics high" this is successful i.e. picks up overloaded StatCollect

When I then try "dbschema -d my_db -hd udt_table" I get
"-937 - User Defined Routine error."

I'm 99.9% sure this error is not coming from my overloaded "StatPrint" function as this is the same error I was getting prior to writting the "StatPrint" function.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On