 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
tony_se Guest
|
Posted: Sat Mar 31, 2007 7:16 pm Post subject: function in derby[beginner] |
|
|
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!!! |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Sat Mar 31, 2007 9:16 pm Post subject: Re: function in derby[beginner] |
|
|
tony_se wrote:
| Quote: | 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;
}
}
|
Please do not multi-post, that is, send the same message independently to
different newsgroups. It fragments the thread and doesn't let people see all
the answers to your question.
Instead, cross-post, if you really, really, really must reach multiple groups,
preferably with "followup" set to one of the groups.
Like this reply, cross-posted to alt.comp.lang.java, clj.help,
comp.lang.java.programmer and clj.databases, with f/u set to clj.help.
-- Lew |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|