Stored Procedure Parameters Ignored in Call

[expired user #8984]'s profile image [expired user #8984] posted 9 years ago in Running SQL scripts Permalink
When I "called" this procedure, it generated this error message:
/* SQL Error (1318): Incorrect number of arguments for PROCEDURE smher.tblmkr; expected 0, got 2 */

Equally troubling to me is the system's failure to color the word, DECLARE blue. DECLARE was apparently not recognized as a legitimate MySQL command.
:

1. CREATE DEFINER =`smher` @`%` PROCEDURE `tblmkr`(IN `TABnm` VARCHAR(6),
IN `TABsRqd` INT ,
OUT `TABsMade` INT)
2. LANGUAGE SQL
3. NOT DETERMINISTIC
4. CONTAINS SQL
5. SQL SECURITY DEFINER
6. COMMENT ''
7. BEGIN
8. DECLARE @n INT DEFAULT 0 ;
9. DECLARE @TABname VARCHAR( 6);
10. END;

[expired user #8984]'s profile image [expired user #8984] posted 9 years ago Permalink
When calling the procedure, you must enclose the integer value for the first parameter in single quote marks, just as one must the text string for the second parameter.
ansgar's profile image ansgar posted 9 years ago Permalink
Did you click the "Call procedure(s)" button or excute it by hand?
[expired user #8984]'s profile image [expired user #8984] posted 9 years ago Permalink
I clicked the "Run Routine" button which brought up a request for a value for the first parameter, TabsAsk.
I entered a number and pressed Enter which brought up a
Query box with the proc call which I executed via the "Execute SQL" button.

These steps did not generate an error message, but when I click SAVE I get the 1064 message.

Please login to leave a reply, or register at first.