要Sql server 7.0干嘛?
public static boolean updata(String sql)
    {
      try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");        Connection conn;
        Statement  stmt;
        boolean rs;
        conn=DriverManager.getConnection("jdbc:odbc:smanaga","","");
        stmt=conn.createStatement();
        rs = stmt.execute(sql);
        conn.close();
        return true;
      }
      catch (Exception e) {
        System.out.print(e);
        return false;
      }    }