Can somebody explain me what does Java Result: -1073740791 mean. I had a code which used to send data that was saved in my mysql database, through ethernet using UDP protocol, everything worked fine until i sent fewer data(25 rows), when i started sending data in huge amount(100 rows) it used to display Java Result: -1073740791 and would stop the running code. Im using jpcap, winpcap and netbeans.
Java Result: -1073740791
Collapse
X
-
Tags: None
-
Code:while(rs.next()) { outData.append(rs.getLong(1)).append(":") .append(rs.getString(2)).append(":").append(rs.getInt(3)) .append(":").append(rs.getString(4)).append(":") .append(rs.getString(5)).append(":") .append(rs.getString(6)).append("$"); } outData.append("#");
java mysql
getString varchar
getLong Bigint
getInt int, tinyint */
the error occurs after this ResultSet block, , i dont know whyComment
-
i tried doing it by sending 25 rows of data per 1 iteration of for loop and it works fine. But when i try to transmit whole set of data its not working, it gives the same notification(Ja va Result:-1073807364).
Is their any limit for ResultSet?!Comment
-
i transmit the accessed data from database to an other system via ethernet.
i have set the limit here -
Code:String query = "select * from table_name limit "+limit1+",25";
Comment
-
-
You now need to create a small but full complete class with code that demonstrates the problem and post it. If the error is database side only like you are suggesting by saying it's affected by the limit then the example code shouldn't need to include the part that transfers the files.Comment
-
I have attached the whole working code part causing the problem, please find the attachment.Attached FilesComment
-
Code:public static String getData(String table) { Connection con = null; StringBuilder outData = new StringBuilder(); try { Class.forName("com.mysql.jdbc.Driver"); String conURL = "jdbc:mysql://localhost/icart"; con = DriverManager.getConnection(conURL, "user", "pswrd"); String query = "select * from " + table + ""; System.out.println(query); PreparedStatement st = con.prepareStatement(query); ResultSet rs = st.executeQuery(); outData.append("%"); System.out.println("appending data"); while (rs.next()) { outData.append(rs.getBigDecimal(1)) .append(":").append(rs.getString(2)).append(":") .append(rs.getInt(3)).append(":") .append(rs.getString(4)).append(":") .append(rs.getString(5)).append(":") .append(rs.getString(6)).append("$"); } outData.append("~"); //the code terminates at this line rs.close(); con.close(); System.out.println(outData); } catch (ClassNotFoundException ex) { Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException | RuntimeException e) { JOptionPane.showMessageDialog(null, e); } return outData.toString(); }
Comment
-
i see some errors in log file after printing the StackTraces, i don't understand what they actually mean, kindly help me.
Here i attach my IDELog fileAttached FilesComment
Comment