Oledb driver calls Oracle Stored Procedure error: ORA-06502

Source: Internet
Author: User

I haven't been writing here for a long time. I 've been busy modifying System bugs and preparing for exams. I spent most of my time learning the project management knowledge. New technologies are also less researched and applied, and I don't know what to write or what to write.

In the past few days, we encountered a difficult problem in the bug modification process. The database adopted Oracle 10 Gb, and the database client of the application server was Oracle 9i. The oledb driver is used to connect to the database. The Oracle oledb driver patch must be installed on the server. Otherwise, an error occurs. It was because the driver was not installed before, which caused a lot of trouble, it also took a lot of effort to solve the problem.

In a function, you need to call the stored procedure, return the process processing result, and perform no other operations. When the execution is executed to executenonquery ();, Exception Processing is executed, and the stored procedure is completely correct, the error message is as follows:

ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: At publish_org_monthly, line 291
ORA-01461: can bind a long value only for insert into a long column
ORA-06512: At line 1
 
I also found a variety of ways to solve the problem is not successful, I thought it was because the Oracle version is inconsistent, or the ODAC1020221-OLEDB driver patch is inconsistent, due to helpless, the Oracle 9i unload, after 10 Gbit/s and driver patches are reinstalled, the stored procedure call still fails.

No, it's time to get off work. Solve it the next day. It seems that when I woke up a lot in the morning, I checked it.CodeWhen passing the parameter code to the stored procedure, we found that the parameter name is consistent with that in the stored procedure. We were surprised to find that the parameter order is different from that in the stored procedure, then immediately adjust the order and the result is passed.

A rock in my heart is finally put down, because the system is going to be online on the 25 th. It may be hard to solve this problem in the past few days ~~~

This is also an experience. I would like to share it with you and remind myself not to make similar mistakes in the future, which can save a lot of energy.

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.