Insert into values (values, readername, values, countrycardid, citizencardid, password, values, libraries identity, nationality, openaccountdate, libraryreadertype, values, isotherlibraryreader, readercarstate) values ('hangzhou', 'shenchao', 1, '20160301', '20160301', 'qsc82056661 ', empty_blob (), empty_blob (), empty_blob (), '123', 'China', to_date ('2017-11-25 ', 'yyyy-mm-dd'), '2017 _ 001 ', '2017 _ 001', 0, 'payby ');
When writing this, the following error occurs:
ORA-00984: column not allowed here
I asked the following questions on the Forum:
Http://topic.csdn.net/u/20081125/16/cc851b1d-4e4f-444c-86e0-fd38fff599c8.html
It turns out that I accidentally wrote the to_date ('','') error when writing code. In addition, it is not correct to add "" to table fields.
Here we will review it.
Select fingerfeaturea, fingerfeatureb, fingerfeaturec, fingerfeatured, fingerfeaturee from RFID. m_reader_info RR where RR. readercardbarcode =?
This problem also occurs. First, the index is incorrect. I read the code.
Preparedstatement PSTA = conn. preparestatement (query_figerinfo
. Tostring ());
PSTA. setstring (0, readerinfo. getrdid ());
Rs = psta.exe cutequery ();
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 ();
I thought there was nothing wrong. After a while, I learned that JDBC started with 1. It does not matter. Depressed. The modification is as follows:
Preparedstatement PSTA = conn. preparestatement (query_figerinfo
. Tostring ());
PSTA. setstring (1, readerinfo. getrdid ());
Rs = psta.exe cutequery ();
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.
Careless and stupid.
Review !!!