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.