/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import java.util.logging.Level; import java.util.logging.Logger; // import com.mysql.jdbc.*; import java.sql.*; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author sukanta */ public class Main { try { Class.forName("com.mysql.jdbc.Driver"); Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } stmt = con.createStatement(); while (result.next()) result.close(); con.close(); } }