kostenloser Webspace werbefrei: lima-city


explore help

lima-cityForumProgrammiersprachenJava

  1. Autor dieses Themas

    hpessmsncom

    hpessmsncom hat kostenlosen Webspace.

    import java.sql.*;

    public class DataBaseManager {
    Connection con;
    ResultSet rs;
    Statement stmt;
    public DataBaseManager() {
    try {
    String url = "jdbc:odbc:books";
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(url);
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    }
    catch (SQLException sqle) {
    System.out.println(sqle.toString());
    }
    catch (ClassNotFoundException cnfex) {
    cnfex.printStackTrace();
    }
    }

    public ResultSet getResult(String strSQL) {
    try {
    rs = stmt.executeQuery(strSQL);
    return rs;
    }
    catch (SQLException sqle) {
    System.out.println(sqle.toString());
    return null;
    }

    }

    public int updateSql(String strSQL) {
    try {
    int i=stmt.executeUpdate(strSQL);
    con.commit();
    return i;
    }
    catch (SQLException sqle) {
    System.out.println(sqle.toString());
    return -1;
    }
    }

    public void closeConnection() {
    try {
    con.close();
    }
    catch (SQLException sqle) {
    System.out.println(sqle.toString());
    }
    }

    }
    Code operation the queen , why such a hint of
    Exception in thread "main" java.lang.NoSuchMethodError:main
    have appeared on meeting this paragraph , I have been that new hand does not know , asked everybody to give advices much , withered here first.
  2. Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!

    lima-city: Gratis werbefreier Webspace für deine eigene Homepage

Dir gefällt dieses Thema?

Über lima-city

Login zum Webhosting ohne Werbung!