Oracle Database Insert data error: ORA-06550

Source: Internet
Author: User

WPF app calls Oracle's stored procedure with error "ORA-06550: Number of arguments or wrong parameter type", such as:

Repeated checks, the parameters of the stored procedure and the type of parameters are correct, feel very strange. Finally finally solved,

The reason is to pass in DBNull.Value when the value of the parameter is null, such as:

Summarize:

In the case of a SQL Server database, the field is nullable, and when the passed-in parameter is NULL, the pass-through value can be successfully inserted into the database.

However, the Oracle database, the incoming parameter is NULL, you need to pass in DBNull.Value, such as:

Oracle Database Insert data error: ORA-06550

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.