Stored procedure-"Too many parameters specified for procedure or function" error

Source: Internet
Author: User

Recently in a busy company project, one of the modules to use the stored procedure, in the program during the specific execution of the stored procedure has reported "for the procedure or function specified too many parameters" error. By carefully comparing the stored procedures in the program with the definitions in the database, it is found that there is no difference. No, only a 1.1-point comparison, half an hour past or not found the source of the error. Helpless under, had to consult other great gods. Is the great God worthy of the great God, only to ask me one sentence, is your library determined to be connected? Immediately awakened, my configuration file is connected to the remote library, changed to a local library after the program smoothly.

In the process of solving the problem of Baidu, I found that this error may also be the following situations:

1. Stored procedure naming starts with SP

If you start with an SP, the user-created stored procedure will always first check the master database. If a user creates a stored procedure with the same name as a system stored procedure, the user-created stored procedure is never executed.

2, the rules are not uniform

The name of the stored procedure or the number of parameters it defines is inconsistent with the number of parameters specified in the program, which is low-level, but sometimes we also make

3. Database Call Error

That's what I'm doing. Error, connection string in configuration file not modified

The common mistakes have been enumerated, the concrete solution is no longer tired of the statement. Hope to be of help to everyone.




Stored procedure-"Too many parameters specified for procedure or function" error

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.