java.sql.SQLException:ORA-00917:缺失逗号String sql1 = "insert into KAOQINSIGN (EID,MORNINGS,MORNINGX,AFTERNOONS,AFTERNOONX,riqi)" +\x05\x05\x05\x05\x05"values('"+LoginFrame.i_user+"','"+Today.getNowTime()+"','"+ null +"'," +"','"+null+"','"+null+

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 11:27:50
java.sql.SQLException:ORA-00917:缺失逗号String sql1 =
xRk`W>fm ⌕ºQ kA2 6tη*N[[qE"닆&O ^|wwqiE aqa>HTUT|25usa7,ա]5dP k:{qa!ɋ982l:EV4ȐЃ荋?"er!0 Uf5)'" 1,cY8#4Msr x J1%!g.-iKx#xHrEIk^ kؽ`TP!:~hWwH>6V /&4Xc[q2*ܒ{e{X;Uisxۂr aBĪ۝iLJCilxѤA~IpT;svpCF}+c UpN:1-LswgѦ^,i(>"YR

java.sql.SQLException:ORA-00917:缺失逗号String sql1 = "insert into KAOQINSIGN (EID,MORNINGS,MORNINGX,AFTERNOONS,AFTERNOONX,riqi)" +\x05\x05\x05\x05\x05"values('"+LoginFrame.i_user+"','"+Today.getNowTime()+"','"+ null +"'," +"','"+null+"','"+null+
java.sql.SQLException:ORA-00917:缺失逗号
String sql1 = "insert into KAOQINSIGN (EID,MORNINGS,MORNINGX,AFTERNOONS,AFTERNOONX,riqi)" +
\x05\x05\x05\x05\x05"values('"+LoginFrame.i_user+"',
'"+Today.getNowTime()+"',
'"+ null +"'," +"','"+null+"','"+null+"',
'"+Today.getNowDate()+"')";
LoginFrame.i_user是int类型,这句sql哪里错了?

java.sql.SQLException:ORA-00917:缺失逗号String sql1 = "insert into KAOQINSIGN (EID,MORNINGS,MORNINGX,AFTERNOONS,AFTERNOONX,riqi)" +\x05\x05\x05\x05\x05"values('"+LoginFrame.i_user+"','"+Today.getNowTime()+"','"+ null +"'," +"','"+null+"','"+null+
int类型如果在数据库中是number类型的话,插入的时候不要加单引号
去掉第一个值的单引号如下:
"values("+ LoginFrame.i_user+ ",'"
如果数据库中是字符型的话,就不是这个原因了
还有 在你的第一个null后面加了两个逗号,删掉一个试试