List:General Discussion« Previous MessageNext Message »
From:Ed Reed Date:December 1 2006 7:22pm
Subject:Stored procedure parameters problem
View as plain text  
I have a problem/question I'd like to find someone else to verify/answer
for me.
 
I'm using MySQL 5.1.09 running on Netware. I've created a stored
procedure that has one parameter,
 
Create Procedure MyTest(strVal VarChar)
Begin
 Select Field1, Field2, Field3 From MyTable 
 Where Field3=strVal;
End
 
When I call the procedure like this,
 
Call MyTest('test');
 
Its suppose to return a result set but it fails with an error that the
"proc table is missing, corrupt, or contains bad data." But if I create
the procedure like this,
 
Create Procedure MyTest(strVal VarChar(25))
Begin
 Select Field1, Field2, Field3 From MyTable 
 Where Field3=strVal;
End
 
and call it the same as before I get the expected result set.
 
So now the question, should the fact that I specified a VarChar as the
data type indicate that this is supposed to be a variable-length-string
variable with no size limit other than the max size of the data type?
 
Thanks in advance.
 

Thread
Stored procedure parameters problemEd Reed1 Dec
  • Re: Stored procedure parameters problemChris White1 Dec
    • Re: Stored procedure parameters problemEd Reed1 Dec
    • Re: Stored procedure parameters problemPaul DuBois2 Dec
      • Re: Stored procedure parameters problemEd Reed5 Dec