我正在忙于将SQLite数据库与java应用程序一起使用,并在成功更新数据库后出现以下错误
org.sqlite.jdbc4.JDBC4PreparedStatement@4e1c6f
以下是我的更新代码
PreparedStatement update = con.prepareStatement("UPDATE highLeaker SET " + cyc + " = "
+ dataArray[3] + " , "
+ "gasSurveyOperator" + " = "
+ dataArray[1] + " , "
+ "gasSurveySerial" + " = "
+ dataArray[2] + " , "
+ "loss" + " = "
+ dataArray[4] + " , "
+ "comment" + " = "
+ dataArray[5] + " , "
+ "cycle" + " = '"
+ cycleT + "' , "
+ "date" + " = "
+ dataArray[6]
+ " WHERE leakerID = " + dataArray[0]+";");
System.out.println(update);
update.executeUpdate();
dataRow = CSVFile.readLine(); // Read next line of data.
答案 0 :(得分:0)
你打印出了这个物体。此外,我强烈建议在执行SQL查询时使用占位符。