Execution of stored procedure-"Too many parameters are specified for the procedure or function" error

Source: Internet
Author: User

 The previous day, I wrote the user registration module and added the user using the stored procedure. At the beginning, I reported that "too many parameters are specified for the process or function sp_adduser ". Check the user adding function on the data layer carefully. When the sqlparameter parameter is added to the stored procedure, the array is incorrectly written (too many parameters ). After the correction, compile and run the command. The result still shows "too many parameters are specified for the process or function sp_adduser ". Store the stored procedure by yourselfProgramI checked it several times. No problem. Search online. When the stored procedure was originally executed,If it starts with SP, the stored procedure created by the user always checks the master database first (even if the stored procedure has been specified by the database name ). If the stored procedure created by a user has the same name as the system stored procedure, the stored procedure created by the user will never be executed.

 

I did not pay attention to it at ordinary times. The sp_adduser I named is the stored procedure of the system. It is no wonder that it cannot be executed. Therefore, it is best not to start the stored procedure with SP in the future. Conflicts will occur if you do not pay attention to it. For example, sp_adduser and sp_addmessage are also easy to use. However, they are in conflict with the system stored procedure and you will not define them,Therefore, the error "too many parameters are specified for a process or function" is always reported.

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.