Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Driver does not support this function error

843854Oct 21 2004 — edited Oct 22 2004
Hi

When I tried to use PreparedStatement object I get exception that tells me "SQLException: Driver does not support this function".

Im using Java 1.4.1
Jdbc:odbc bridge
Access

and how can i know my JDBC Driver version?
  public void updateMoviesTable(){
    try {
      con = DriverManager.getConnection(url,
                                        "myLogin", "myPassword");
      String updateString = "UPDATE MOVIES " +
                   "SET RENTS = ? " +
                   "WHERE TITLE = ? ";

      PreparedStatement updateRents = con.prepareStatement(updateString);
      updateRents.setInt(1,45);
      updateRents.setString(2,"BirdOn a Wire");
      updateRents.executeUpdate();
     
      ResultSet rs = updateRents.executeQuery("select TITLE,RENTS from MOVIES where TITLE='Bird On a Wire'");

      while(rs.next()){
        String title = rs.getString("TITLE");
        int rents = rs.getInt("RENTS");
        System.out.println("the title "+ title +" was updated wit "+ rents +" times");
      }
    }
    catch (SQLException ex) {
      System.err.println("SQLException: " + ex.getMessage());

    }
  }
}
Thanks
D

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2004
Added on Oct 21 2004
10 comments
489 views