一个UPDATE把我的表都给刷了
pstmt=con.prepareStatement("update incount set date=? ,kfproduct=? ,pm=? ,gg=? , gysh=? ,sl=? , ma=? , mao=? , mi=? , mio=? , pd=? where id = id");
pstmt.setString(1,date);
pstmt.setString(2, kfproduct);
pstmt.setString(3, pm);
pstmt.setString(4, gg);
pstmt.setString(5, gysh);
pstmt.setInt(6, sl);
pstmt.setInt(7, ma);
pstmt.setString(8, mao);
pstmt.setInt(9, mi);
pstmt.setString(10, mio);
pstmt.setString(11, pd); pstmt.executeUpdate(); con.commit();//手动提交
System.out.println("提交成功");
con.setAutoCommit(true);//设回来.
pstmt=con.prepareStatement("update incount set date=? ,kfproduct=? ,pm=? ,gg=? , gysh=? ,sl=? , ma=? , mao=? , mi=? , mio=? , pd=? where id = id");
pstmt.setString(1,date);
pstmt.setString(2, kfproduct);
pstmt.setString(3, pm);
pstmt.setString(4, gg);
pstmt.setString(5, gysh);
pstmt.setInt(6, sl);
pstmt.setInt(7, ma);
pstmt.setString(8, mao);
pstmt.setInt(9, mi);
pstmt.setString(10, mio);
pstmt.setString(11, pd); pstmt.executeUpdate(); con.commit();//手动提交
System.out.println("提交成功");
con.setAutoCommit(true);//设回来.
如果日志损坏了用 log explorer
如果还不行就帮哭
go
backup log aaa to disk='e:\test.trn' with norecovery
go ---然后执行以下操作
restore database aaa from disk='d:\dd.bak' with norecovery
go
restore log aaa from disk='e:\test.trn'
with recovery,stopat='2009-06-20 15:22:00'--这时,数据库恢复到15:20的状态