insert into m_reader_info(READERCARDBARCODE,READERNAME,ISNEEDPASSWORDPROTECT,COUNTRYCARDID,CITIZENCARDID,PASSWORD,FINGERFEATUREA,FINGERFEATUREB,FINGERFEATUREC,FINGERFEATURED,FINGERFEATUREE,LIBRARYIDENTITY,NATIONALITY,OPENACCOUNTDATE,LIBRARYREADERTYPE,OTHERLIBRARYREADERTYPE,ISOTHERLIBRARYREADER,READERCARSTATE) values('rrrrrrrrrwwwwwwq','沈超',1,'33900595','777777777','qsc82056661',EMPTY_BLOB(),EMPTY_BLOB(),EMPTY_BLOB(),EMPTY_BLOB(),EMPTY_BLOB(),'0001','中国',to_date('2008-11-25','yyyy-MM-dd'),'999_001','999_001',0,'有效');
写这个的时候,出现了:
ORA-00984: column not allowed here
我在论坛上发问了:
http://topic.csdn.net/u/20081125/16/cc851b1d-4e4f-444c-86e0-fd38fff599c8.html
原来是自己在写代码的时候不小心把to_date('','')写错了。而且之前在TABLE的字段的时候,也有加上“”,其实是不对的。
在这里检讨下。
select FINGERFEATUREA,FINGERFEATUREB,FINGERFEATUREC,FINGERFEATURED,FINGERFEATUREE from rfid.m_reader_info rr where rr.READERCARDBARCODE=?
这个问题也出现了,先是索引不正确。我看了一下代码。
PreparedStatement psta = conn.prepareStatement(QUERY_FIGERINFO
.toString());
psta.setString(0, readerInfo.getRdId());
rs = psta.executeQuery();
if (rs != null) {
if (rs.next()) {
doBlob(rs.getBlob(0), readerAddinfo.getFingerFeatureA());
doBlob(rs.getBlob(1), readerAddinfo.getFingerFeatureB());
doBlob(rs.getBlob(2), readerAddinfo.getFingerFeatureC());
doBlob(rs.getBlob(3), readerAddinfo.getFingerFeatureD());
doBlob(rs.getBlob(4), readerAddinfo.getFingerFeatureE());
}
}
conn.commit();
先前以为没有什么错。后面再G了一下,才晓得,原来JDBC的东西是以1开始的。无所谓0。郁闷。于是修改如下:
PreparedStatement psta = conn.prepareStatement(QUERY_FIGERINFO
.toString());
psta.setString(1, readerInfo.getRdId());
rs = psta.executeQuery();
if (rs != null) {
if (rs.next()) {
doBlob(rs.getBlob(1), readerAddinfo.getFingerFeatureA());
doBlob(rs.getBlob(2), readerAddinfo.getFingerFeatureB());
doBlob(rs.getBlob(3), readerAddinfo.getFingerFeatureC());
doBlob(rs.getBlob(4), readerAddinfo.getFingerFeatureD());
doBlob(rs.getBlob(5), readerAddinfo.getFingerFeatureE());
}
}
conn.commit();
OK了。
真是粗心加蠢笨啊。
检讨!!!
写这个的时候,出现了:
ORA-00984: column not allowed here
我在论坛上发问了:
http://topic.csdn.net/u/20081125/16/cc851b1d-4e4f-444c-86e0-fd38fff599c8.html
原来是自己在写代码的时候不小心把to_date('','')写错了。而且之前在TABLE的字段的时候,也有加上“”,其实是不对的。
在这里检讨下。
select FINGERFEATUREA,FINGERFEATUREB,FINGERFEATUREC,FINGERFEATURED,FINGERFEATUREE from rfid.m_reader_info rr where rr.READERCARDBARCODE=?
这个问题也出现了,先是索引不正确。我看了一下代码。
PreparedStatement psta = conn.prepareStatement(QUERY_FIGERINFO
.toString());
psta.setString(0, readerInfo.getRdId());
rs = psta.executeQuery();
if (rs != null) {
if (rs.next()) {
doBlob(rs.getBlob(0), readerAddinfo.getFingerFeatureA());
doBlob(rs.getBlob(1), readerAddinfo.getFingerFeatureB());
doBlob(rs.getBlob(2), readerAddinfo.getFingerFeatureC());
doBlob(rs.getBlob(3), readerAddinfo.getFingerFeatureD());
doBlob(rs.getBlob(4), readerAddinfo.getFingerFeatureE());
}
}
conn.commit();
先前以为没有什么错。后面再G了一下,才晓得,原来JDBC的东西是以1开始的。无所谓0。郁闷。于是修改如下:
PreparedStatement psta = conn.prepareStatement(QUERY_FIGERINFO
.toString());
psta.setString(1, readerInfo.getRdId());
rs = psta.executeQuery();
if (rs != null) {
if (rs.next()) {
doBlob(rs.getBlob(1), readerAddinfo.getFingerFeatureA());
doBlob(rs.getBlob(2), readerAddinfo.getFingerFeatureB());
doBlob(rs.getBlob(3), readerAddinfo.getFingerFeatureC());
doBlob(rs.getBlob(4), readerAddinfo.getFingerFeatureD());
doBlob(rs.getBlob(5), readerAddinfo.getFingerFeatureE());
}
}
conn.commit();
OK了。
真是粗心加蠢笨啊。
检讨!!!