这是代码:
PreparedStatement preparedStatement = conn.prepareStatement("update DateDeletion set DeletionDate= ? ,userName= ? where LedgerName='MiscelleniousExpenses'");
preparedStatement.setString(1,Deletiondate);
preparedStatement.setString(2,userName);
//preparedStatement.setTimestamp(3,null);
//preparedStatement.setString(4,"MiscelleniousExpenses");
System.out.println("date :"+Deletiondate+"username :"+userName+"ts :"+timeStamp);
int rowsUpdated= preparedStatement.executeUpdate();//for insert statement
System.out.println(rowsUpdated);
conn.close();
if(rowsUpdated>0){
System.out.println ("Ok.");
//ExpenditureMasterBeanInit();
return "updated";
}
rowsupdated 更新了 0 行.....当我检查 'select Deletiondate from Datedeletion where LedgerName='MiscelleniousExpenses'; 它给了我一个价值可能有什么问题?