Two Oracle errors today

Source: Internet
Author: User
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 !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.