db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "DerbySQLroutines" by KnutAndersHatlen
Date Sat, 31 May 2008 12:34:02 GMT
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();
  

Mime
View raw message