自动编号类型不匹配问题
使用jsp语言从access中按照自动编号的字段删除符合条件的行时,如下代码
String delete1="delete from question where q_id='"+id+"'";
s.executeUpdate(delete1);
运行时就会出现类型不匹配问题,这里id的类型像int,float,double,long我都试过了没有一个是匹配的,(access上说的是长整型),但是写成:
String delete1="delete from question where q_id="+id;
s.executeUpdate(delete1);
运行没问题,大家知道的还请详细解释一下!先谢谢大家了!