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