Jump to content

choky10

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by choky10

  1. Any problem if i doe a script in java to login into cpanel every 29 days?
  2. What is to consider Inactivity, my app is just using MYSQL, i dont use the webpage so if the webpage is no open in a long time.. that can to consider Inactivity? ---------------Detectar idiomaAfrikáansAlbanésAlemánAmáricoÁrabeArmenioAzerbaiyanoBengalíBielorrusoBirmanoBosnioBúlgaroCanarésCatalánCebuanoChecoChino (Simplificado)Chino (Tradicional)CingalésCoreanoCorsoCriollo haitianoCroataDanésEslovacoEslovenoEspañolEsperantoEstonioEuskeraFinésFrancésFrisón occidentalGaélico escocésGalésGallegoGeorgianoGriegoGuyaratíHausaHawaianoHebreoHindiHmongHúngaroIgboIndonesioInglésIrlandésIslandésItalianoJaponésJavanésJemerKazajoKirguísKurdoLaoLatínLetónLituanoLuxemburguésMacedonioMalayalamMalayoMalgacheMaltésMaoríMaratíMongolNeerlandésNepalíNoruegoNyanjaPanyabíPastúnPersaPolacoPortuguésRumanoRusoSamoanoSerbioSesotho meridionalShonaSindhiSomalíSuajiliSuecoSundanésTagaloTailandésTamilTayikoTeluguTurcoUcranianoUrduUzbekoVietnamitaXhosaYidisYorubaZulúInglés
  3. Hello i want to know the MAX USER CONNECTIONS is because i close the connection? or what this i code i want ask for help because after 4 search, i get the MAX USER CONNECTIONS error ListarClientes.java Here i put the rows and columns to the Table, and i ask for the SQL public void ListarClients(String consulta, DefaultTableModel modelo) throws SQLException{ String sql = consulta; Connection con = Conexion.connect(); try { Statement s = con.createStatement(); ResultSet rs = s.executeQuery(sql); ResultSetMetaData metaDatos = rs.getMetaData(); // Se obtiene el número de columnas. int numeroColumnas = metaDatos.getColumnCount(); Object[] etiquetas = new Object[numeroColumnas]; for (int i = 0; i < numeroColumnas; i++){ // Nuevamente, para ResultSetMetaData la primera columna es la 1. etiquetas[i] = metaDatos.getColumnLabel(i + 1); } modelo.setColumnIdentifiers(etiquetas); while (rs.next()){ Object [] fila = new Object[numeroColumnas]; for (int i=0;i<numeroColumnas;i++) fila[i] = rs.getObject(i+1); // El primer indice en rs es el 1, no el cero, por eso se suma 1. modelo.addRow(fila); cerrar(); rs.close(); } } catch (SQLException ex) { JOptionPane.showMessageDialog(null, ex); } } 1 SEARCH 1 RUN 1 TIME WHEN I OPEN THE SEARCH.JAVA WITH THE METODO ALL(); - WITH THIS WHEN THE FRAME GET OPEN THE DATA IS PREPARE AND IS IN THE TABLE public void all(){ Usuarios u = new Usuarios(); DefaultTableModel modelo = new DefaultTableModel(); String consulta = "SELECT * FROM clientes"; try { u.ListarClients(consulta, modelo); } catch (SQLException ex) { Logger.getLogger(BuscarCliente.class.getName()).log(Level.SEVERE, null, ex); } tabla.setModel(modelo); } 2.- SEARCH.. IN THE BOX I put the data to search and i click in search button, this button jave this method: IN THIS MOMMENT all is ok.. Usuarios u = new Usuarios(); DefaultTableModel modelo = new DefaultTableModel(); String consulta = "SELECT * FROM clientes WHERE rfc LIKE '"+rfc.getText()+"%'"; try { u.ListarClients(consulta, modelo); } catch (SQLException ex) { Logger.getLogger(BuscarCliente.class.getName()).log(Level.SEVERE, null, ex); } tabla.setModel(modelo); 3.- i doe another search with the same method... 4.- i doe another and the error max connections show in this momment the SQLExeception 5.- IF I CLOSE THE PROJECT AND RUN AGAIN THE CONSOLE IS BUG IN THE SQLExecption Max Users Connections and the program cant continue.. What i doe wrong? My code i dont close the connections ? or what?
  4. Cool, thanks! We accept donations of $1.00 USD or more. Anything less than that and paypal takes too much of our donation. We recommend donating the amount that you feel our service is worth to you. All of our servers can do what you need. When you make a donation you will have the opportunity to switch to the Tommy server. The main difference is Johnny is very slow and has a lot of downtime. Tommy is our fastest server and has pretty much perfect uptime. Yeah i put for all connections with "%" Now i just try, with a just one .java file for testing: package System; import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JOptionPane; /** * * @author juan */ public class Conexion { static private String user = "choky10"; static private String pass = ""; static private String dbClass = "com.mysql.jdbc.Driver"; static private String dbDriver = "jdbc:mysql://johnny.heliohost.org:3306/choky10_corepi22"; static private Connection conn = null; public static void main(String[] args) { connect(); } public static Connection connect() { try { Class.forName(dbClass); System.out.println("driver loaded"); // THIS IS BEING RETURNED conn = DriverManager.getConnection(dbDriver, user, pass); System.out.println("connected"); // THIS IS NOT BEING RETURNED return conn; } catch (SQLException ex) { System.out.println("SQLException: " + ex.getMessage()); return null; } catch (ClassNotFoundException ex) { System.out.println("ERRRO"+ex); return null; } } } I see now with the port the file can connect to de server but i get that... i type that in google and is with the MYSQL config and i really dont know why this happen, my exp in java is very good but with mysql, i just know the basic how implements with java and doe, consults, tablets with keys, foreings etc UPDATE I add my public ip to remote MYSQL and work but why? I put the "%" SOLVED. I see the error, i put the is wrong i dont see very good..
  5. Thanks i dont see... that now i get a new show error:driver loaded SQLException: Communications link The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. And i have a ask for my next payment i want to donate how much i need to donate? I just use the server in PHP for Private Work System, and MYSQL with java to run a basic app desktop to my work
  6. Hello, im are 20 years old from mexico. I work in a goberment place, and every two moths i enter in a web page from gob.mx to downloand like 2000+ Bills. With my program running in java, i make the "Login More fast" I have my project in java in localhost Runnig, the page putme in Jonny Server y try to connect my project with the host using this code: boolean done = false; //load driver try { Class.forName(dbClass).newInstance(); System.out.println("driver loaded"); // THIS IS BEING RETURNED } catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) { System.err.println(ex); } try { conn = DriverManager.getConnection(dbDriver, user, pass); System.out.println("connected"); // THIS IS NOT BEING RETURNED done = true; } catch (SQLException ex) { System.out.println("SQLException: " + ex.getMessage()); } return done; } But if i test i just get like 1mn later.. SQLException: Packet for query is too large (5526600 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable. I ask.. The server is slow.. or my code is wrong? My vars are: static private String user = "choky10"; static private String pass = ""; static private String dbClass = "com.mysql.jdbc.Driver"; static private String dbDriver = "jdbc:mysql://www.johnny.heliohost.org:2083/choky10_xxx"; static private Connection conn = null;
×
×
  • Create New...