Study: An error occurred while using DataTime parameters in Access.

Source: Internet
Author: User
I wonder if you have encountered such a problem. If you encounter a DateTime type error when using parameterized query or updating records in the ACCESS database. According to Chapter E of Mencius, this may be because the date type in C # cannot be directly converted to the date type OleDbType. DBDate in Access. His solution. But if we

I don't know if you have encountered such a problem. If you use the DateTime type to query or update records in the ACCESS database, an error will occur. According to Chapter E of Mencius, this may be because the date type in C # cannot be directly converted to the date type OleDbType. DBDate in Access. His solution. But if we

I wonder if you have encountered such a problem. In the ACCESS databaseUseParametersWhen querying or updating a record, if the DateTime type is encounteredError. According to Chapter E of Mencius, this may be because the date type in C # cannot be directly converted to the date type OleDbType. DBDate in Access ". His solution.

But if weParametersChange the type to OleDbType. DBDate. Then the problem is that the time part of the DateTime type of dotNet cannot be saved to the ACCESS database.

I can't solve this problem all the time. The only solution is to write it directly in an SQL statement, for example, "#2:20:20 #".

You have a solutionUseParametersType to save the complete DateTime? Let's discuss it together.

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.