You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Mamta Satoor <ms...@gmail.com> on 2005/03/31 09:08:13 UTC

Re: [jira] Created: (DERBY-63) updateNull doesnot work with Embedded Driver

On Tue, 9 Nov 2004 23:03:23 -0800 (PST), Shreyas (JIRA)
<de...@db.apache.org> wrote:
> updateNull doesnot work with Embedded Driver
> --------------------------------------------
> 
>         Key: DERBY-63
>         URL: http://nagoya.apache.org/jira/browse/DERBY-63
>     Project: Derby
>        Type: Bug
>  Components: JDBC
> Environment: Run from a Java Program will appear across platfroms using the embedded driver
>    Reporter: Shreyas
>    Priority: Minor
> 
> The Embedded Driver for Derby still does not implement the updateNull method defined in the interface java.sql.ResultSet.
> 
> Attaching a Repro and the stack trace for the same
> 
> -----------------------------------------------------
> Reproducible Program
> -----------------------------------------------------
> import java.sql.*;
> 
> public class updateNull{
> 
>   public static void main(String [] args) {
> 
>      String strUrl = "jdbc:derby:;databaseName=testdb;create=true";
>      try {
>         Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
>         Connection con = DriverManager.getConnection(strUrl);
> 
>         Statement stmt = con.createStatement();
>         try {
>            stmt.executeUpdate("drop table test");
>         } catch(SQLException ex) {
>            // Do nothing.
>         }
>         con.commit();
> 
>         Statement stmt1 = con.createStatement();
>         stmt1.executeUpdate("create table test(i_val integer, s_val varchar(10))");
>         stmt1.executeUpdate("insert into test values(1,'shreyas')");
>         con.commit();
> 
>         Statement stmt2 = con.createStatement();
>         ResultSet rs = stmt2.executeQuery("select * from test");
>         rs.next();
>         rs.updateNull(2);
>         rs.updateRow();
> 
>      } catch(ClassNotFoundException cnfe) {
>         System.out.println("Class not found: "+cnfe.getMessage());
>      } catch(SQLException sqle) {
>         System.out.println("SQL:Caught: "+sqle.getMessage());
>         sqle.printStackTrace();
>      } catch(Exception e) {
> 
>      }
> 
>   }
> }
> 
> ---------------------Reproducible Ends----------------------------------
> 
> ------------------------------------
>    Stack Trace of the output
> ------------------------------------
> SQL:Caught: Feature not implemented: no details.
> SQL Exception: Feature not implemented: no details.
>        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)
>        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)
>        at org.apache.derby.impl.jdbc.Util.notImplemented(Util.java)
>        at org.apache.derby.impl.jdbc.EmbedResultSet20.updateNull(EmbedResultSet20.java)
>        at updateNull.main(updateNull.java:28)
> -----------------------Stack Trace Ends-------------------------------------------------
> 
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://nagoya.apache.org/jira/secure/Administrators.jspa
> -
> If you want more information on JIRA, or have a bug to report see:
>   http://www.atlassian.com/software/jira
> 
> 


Hi Shreyas,

I have checked in support for update using updatable resultset apis on
forward only updatable resultsets. Can you please test your code again
and close the bug if everything works fine?

thanks,
Mamta

Re: [jira] Created: (DERBY-63) updateNull doesnot work with Embedded Driver

Posted by Mamta Satoor <ms...@gmail.com>.
On Wed, 30 Mar 2005 23:08:13 -0800, Mamta Satoor <ms...@gmail.com> wrote:
> On Tue, 9 Nov 2004 23:03:23 -0800 (PST), Shreyas (JIRA)
> <de...@db.apache.org> wrote:
> > updateNull doesnot work with Embedded Driver
> > --------------------------------------------
> >
> >         Key: DERBY-63
> >         URL: http://nagoya.apache.org/jira/browse/DERBY-63
> >     Project: Derby
> >        Type: Bug
> >  Components: JDBC
> > Environment: Run from a Java Program will appear across platfroms using the embedded driver
> >    Reporter: Shreyas
> >    Priority: Minor
> >
> > The Embedded Driver for Derby still does not implement the updateNull method defined in the interface java.sql.ResultSet.
> >
> > Attaching a Repro and the stack trace for the same
> >
> > -----------------------------------------------------
> > Reproducible Program
> > -----------------------------------------------------
> > import java.sql.*;
> >
> > public class updateNull{
> >
> >   public static void main(String [] args) {
> >
> >      String strUrl = "jdbc:derby:;databaseName=testdb;create=true";
> >      try {
> >         Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
> >         Connection con = DriverManager.getConnection(strUrl);
> >
> >         Statement stmt = con.createStatement();
> >         try {
> >            stmt.executeUpdate("drop table test");
> >         } catch(SQLException ex) {
> >            // Do nothing.
> >         }
> >         con.commit();
> >
> >         Statement stmt1 = con.createStatement();
> >         stmt1.executeUpdate("create table test(i_val integer, s_val varchar(10))");
> >         stmt1.executeUpdate("insert into test values(1,'shreyas')");
> >         con.commit();
> >
> >         Statement stmt2 = con.createStatement();
> >         ResultSet rs = stmt2.executeQuery("select * from test");
> >         rs.next();
> >         rs.updateNull(2);
> >         rs.updateRow();
> >
> >      } catch(ClassNotFoundException cnfe) {
> >         System.out.println("Class not found: "+cnfe.getMessage());
> >      } catch(SQLException sqle) {
> >         System.out.println("SQL:Caught: "+sqle.getMessage());
> >         sqle.printStackTrace();
> >      } catch(Exception e) {
> >
> >      }
> >
> >   }
> > }
> >
> > ---------------------Reproducible Ends----------------------------------
> >
> > ------------------------------------
> >    Stack Trace of the output
> > ------------------------------------
> > SQL:Caught: Feature not implemented: no details.
> > SQL Exception: Feature not implemented: no details.
> >        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)
> >        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java)
> >        at org.apache.derby.impl.jdbc.Util.notImplemented(Util.java)
> >        at org.apache.derby.impl.jdbc.EmbedResultSet20.updateNull(EmbedResultSet20.java)
> >        at updateNull.main(updateNull.java:28)
> > -----------------------Stack Trace Ends-------------------------------------------------
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> >   http://nagoya.apache.org/jira/secure/Administrators.jspa
> > -
> > If you want more information on JIRA, or have a bug to report see:
> >   http://www.atlassian.com/software/jira
> >
> >
> 
> Hi Shreyas,
> 
> I have checked in support for update using updatable resultset apis on
> forward only updatable resultsets. Can you please test your code again
> and close the bug if everything works fine?
> 
> thanks,
> Mamta
> 

Oops, never mind. I noticed that Dan has marked this bug as duplicate
of Jira-99 Add support for update functionality using JDBC 2.0
updatable resultset apis

Mamta