日期:2014-05-20 浏览次数:20833 次
public int excuteUpdate(String sqlString,String... strs)
{
int a = 0;
try
{
psm = sqlConnect.prepareStatement(sqlString);
System.out.println(sqlString);
System.out.println(strs.length);
for(int i = 0; i < strs.length; i++)
{
psm.setString(i+1, strs[i]);
System.out.println("设置第"+i+"个问号");
}
a = this.psm.executeUpdate();
System.out.println("执行了update");
psm.close();
}
catch(SQLException e)
{
e.printStackTrace();
}
finally
{
return a;
}
}