Resolve Oracle exception ora-01861:literal does not match format string (string format mismatch) ____oracle

Source: Internet
Author: User
Tags odbc string format sqlplus

Important thing to say 3 times:

I really hate programming under Windows.

I really hate programming under Windows.

I really hate programming under Windows.


Operation of Oracle database via ADO in VC applications (honestly, I don't really know what the ADO,OLEDB,ODBC is.) in a data synchronization statement, an update date statement does not use the To_date function, and the application returns an error: D Escription: [oracle][odbc][ora]ora-01861:literal does not match format string.

I know this is not the reason for specifying a date string format, but you can fix it by setting the default format, or it's annoying to to_date the date data for each operation.

Because it is the fault of the client program, I then set the environment variable Nls_date_format,sqlplus and Third-party clients can omit the to_date, but the application is still an error.

Helpless, online search many literal does not match format string solution, also tried to modify the registry, join Nls_date_format, still not.

I'm just weird, this environment variable and the registry you don't eat, the application you really want to make out. Whether this is ODBC or OLE DB or ADO which layer does not know this default date format.

In my despair, I think of the database server has related parameter settings, but I still do not think it is a service side of the problem, because the client sqlplus already work, and to_date things should be the client to do it.

Go to the server to check the parameters show parameter nls_date_format,value is empty, try to modify this parameter, it is not an error. I think the function of this parameter is, if the client side said nothing, according to the format to deal with the date of the data bar.


Related Article

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.