Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > function in derby[beginner]

Reply
Thread Tools

function in derby[beginner]

 
 
tony_se
Guest
Posts: n/a
 
      03-31-2007
I have this class:
public class Say {
public static int say(int i) {
System.out.println("* Say: " + i);
return i;
}

public static int say2(String msg) {
System.out.println("** " + msg);
return 1;
}
}

and I created a function in Derby:
create function say2(msg varchar(50)) returns integer
parameter style java no sql language java
external name 'Say.say2';

but when I want to use it, error occurs:
ERROR 42X50: No method was found that matched the method call
Say.say2(java.lang
..String), tried all combinations of object and primitive types and any
possible
type conversion for any parameters the method call may have. The
method might e
xist but it is not public and/or static, or the parameter types are
not method i
nvocation convertible.

And I created another function:
create function say(i integer) returns integer
parameter style java no sql language java
external name 'Say.say';

It works fine.

I've tried hard to figure it out but failed. Can anybody help me?

Thank you in advance!!!

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function versus pointer to function, in context of std::function,huh? Alf P. Steinbach C++ 10 07-27-2011 05:51 AM
Function pointer to void function and int function Giannis Papadopoulos C Programming 5 09-05-2005 09:06 PM
How override ALL function calls? (Is there a "function call function"?) seberino@spawar.navy.mil Python 2 08-01-2005 12:38 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
Passing a C++ object's member function to a C function expecing a function pointer! James Vanns C++ 7 01-21-2004 02:39 AM



Advertisments