{
Connection conn=null;
PreparedStatement
ps = null;
try {
conn=DriverManager.getConnection( connpara.getUrl(), connpara.getUsername(),
connpara.getPassword());
System.out.println(stmt);
ps = conn.prepareStatement(stmt);
ps.executeUpdate();
} catch (Exception
e) {
e.printStackTrace();
System.out.println(e.getMessage());
} finally {
if (ps!=null) ps.close();
if (conn!=null)conn.close();
}
}
public static void main(String argc[])
{
DbInput copydb=new
DbInput();
copydb.dbInit();
copydb.copyproduct();
}
} |