db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milind W <y...@hotmail.com>
Subject RE: jdbc:default:connection fails
Date Wed, 26 Mar 2008 06:21:35 GMT

hi Narayanan,
I tried just your sample and it worked. I have a few other doubts as a result

1) Is it possible to update/insert data from a function
http://wiki.apache.org/db-derby/DerbySQLroutines
This link seems to say its not possible but I would like to confirm.

2) Do we need to have a try catch block in a function? 

Thanks
-Milind







> Date: Tue, 25 Mar 2008 16:08:20 +0530
> From: V.Narayanan@Sun.COM
> Subject: Re: jdbc:default:connection fails
> To: derby-user@db.apache.org
> 
> I tried to reproduce the problem with an environment similar to yours
> 
> You use a 10.1.3.1 derby.jar and 10.1.2.1 of the rest (not sure why you 
> have done this, I would stick
> to a single version jar for my applications)
> 
> I also used J2SE 5.0 like you have done
> 
> here is my sysinfo output
> 
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.5
> --------- Derby Information --------
> JRE - JDBC: J2SE 5.0 - JDBC 3.0
> [/home/vn/work/workspaces/10.1.2/derbyclient.jar] 10.1.2.1 - (330608)
> [/home/vn/work/workspaces/10.1.2/derbynet.jar] 10.1.2.1 - (330608)
> [/home/vn/work/workspaces/10.1.2/derbytools.jar] 10.1.2.1 - (330608)
> [/home/vn/work/workspaces/10.1.3.1/trunk/jars/sane/derby.jar] 10.1.3.1 - 
> (417277)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> ------------------------------------------------------
> 
> Here is the output of the function I had created earlier
> 
> ij version 10.1
> ij>  connect 'jdbc:derby:mydb19;create=true';
> ij> CREATE FUNCTION GetActiveOrg (status VARCHAR(20)) RETURNS 
> VARCHAR(30) LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA EXTERNAL 
> NAME 'com.myorg.derbyfunctions.ActiveOrg.GetActiveOrg';
> 0 rows inserted/updated/deleted
> ij>  values GetActiveOrg('hello');
> 1                                                                                   
                                           
> 
> --------------------------------------------------------------------------------------------------------------------------------
> not 
> null                                                                                
                                       
> 
> 
> 1 row selected
> 
> Would it be possible for you to create a reproducible with the smaller 
> program attached earlier by me?
> It would be much easier to spot the problem then.
> 
> Narayanan
> 
> 
> Milind W wrote:
> > hi,
> > The same code returns null on my machine.
> > I have the following jars in my classpath.
> > derbyclient.jar
> > derbynet.jar
> > derbytools.jar
> > and the  ActiveOrg.classs
> > This is what I have for systeminfo
> >
> > --------- Derby Information --------
> > JRE - JDBC: J2SE 5.0 - JDBC 3.0
> > [C:\java\derby\lib\derbyclient.jar] 10.1.2.1 - (330608)
> > [C:\java\derby\lib\derbynet.jar] 10.1.2.1 - (330608)
> > [C:\java\derby\lib\derbytools.jar] 10.1.2.1 - (330608)
> > [C:\derby.jar] 10.1.3.1 - (417277)
> >
> > I found this link
> > http://db.apache.org/derby/docs/10.2/ref/rrefjdbcjsr169.html
> > that seems to suggest that jdbc:default:connection is not supported 
> > for jdbc3.0.
> >
> > Anyhelp is greatly appreciated.
> > Thanks
> > -Milind

Mime
View raw message