The doAction( ) method  The updater( ) method

Chapter 4: Data Access Using JDBC

The doSQL( ) method

// A JDBCExamples method to execute an SQL statement.

    public static String doSQL (Connection con, String action)  
           throws Exception {

        Statement stmt = con.createStatement();
        int res = stmt.executeUpdate(action);
        return "performed";
 }




Copyright © 2005. Sybase Inc. All rights reserved. The updater( ) method

View this book as PDF