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 

problem with UDF written in Java (urgently!!!)

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
shang-de
Guest





PostPosted: Mon Jul 21, 2003 2:10 pm    Post subject: problem with UDF written in Java (urgently!!!) Reply with quote




Hi,
I am trying to write a UDF to convert an Integer into a String.
but I got a following error:
sqlstate: 38503
sqlcode: -430
I know there must be a mistake in my udf function, but I can't find out
it. here is my code:

public class UDFsrv extends UDF
{

String curout = "0";

public void path (int inputInt,
String outString) throws Exception {

try{

set(2, curout);

curout = curout + ":" +String.valueOf(inputInt);

} catch ( Exception e ) {
throw e;
}
}
}

CREATE FUNCTION path (int)
RETURNS VARCHAR(100)
EXTERNAL NAME 'UDFsrv!path'
LANGUAGE java
PARAMETER STYLE db2general
DETERMINISTIC
FENCED
NOT NULL CALL
NO SQL
NO EXTERNAL ACTION
NO SCRATCHPAD
NO FINAL CALL
ALLOW PARALLEL
NO DBINFO

hopely someone can tell me the mistake. any help would be appreciate!
Tahnks a lot!
Shang

--
Posted via http://dbforums.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases 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.