为什么,不能在EntityBean (BMP) 返回整型???
编译的时候,不能返回整形。。。。??
在这个程序当中,只有一个ejbCreate() ,我的书上有一个例子,他返回的是一个(String) ,我就不明白,为什么不能返回(int)
我需要前辈的指点...
-------------------------------------------
public int ejbCreate(int id, String name, String subject, int look, String email, String logtime) throws CreateException {
try{
PreparedStatement ps=con.prepareStatement("insert into Leaveword (name,subject,look,email,logtime)values(?,?,?,?,?) where id=? order by desc");
ps.setString(1,name);
ps.setString(2,subject);
ps.setInt(3,look);
ps.setString(4,email);
ps.setString(5,logtime);
ps.setInt(6,id);
int i=ps.executeUpdate();----------》(int)
if(i!=1){
ps.close();
con.close();
return i; ---------------???
}
ps.close();
return id; ---------------?????
}catch(Exception e){
System.out.println(e.getMessage());
}
-------------------------------------------------