You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2008/05/31 14:34:02 UTC

[Db-derby Wiki] Update of "DerbySQLroutines" by KnutAndersHatlen

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by KnutAndersHatlen:
http://wiki.apache.org/db-derby/DerbySQLroutines

The comment on the change is:
Fixed typos in example code.

------------------------------------------------------------------------------
  public static void selectRows(int p1, int p2, ResultSet[] data1,
  ResultSet[] data2) throws SQLException {
  
-   Curonnection conn = DriverManager.getConnection("jdbc:default:connection");
+   Connection conn = DriverManager.getConnection("jdbc:default:connection");
    PreparedStatement ps1 = conn.prepareStatement("select * from t1 where i = ?");
    ps1.setInt(1, p1);
    data1[0] = ps1.executeQuery();
  
-   PreparedStatament ps2 = conn.prepareStatement("select * from t1 where i >= ?");
+   PreparedStatement ps2 = conn.prepareStatement("select * from t1 where i >= ?");
    ps2.setInt(1, p2);
    data2[0] = ps2.executeQuery();