AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

function in derby[beginner]

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Discussions
View previous topic :: View next topic  
Author Message
tony_se
Guest





PostPosted: Sat Mar 31, 2007 7:16 pm    Post subject: function in derby[beginner] Reply with 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;
}
}

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





PostPosted: Sat Mar 31, 2007 9:16 pm    Post subject: Re: function in derby[beginner] Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Discussions All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.