MySQL Forums
Forum List  »  Stored Procedures

ASP.NET - Unknown column 'in_status' in 'field list'
Posted by: Jared Asmus
Date: September 30, 2009 10:14PM

I'm trying to call my first MySql stored procedure in ASP.NET and get this error: MySql.Data.MySqlClient.MySqlException: Unknown column 'in_status' in 'field list'

Here is the Stored Procedure:
CREATE DEFINER=`xxxxx`@`xxxxx`
PROCEDURE `retrieve_Categories`(in_status VARCHAR(5))
READS SQL DATA
BEGIN
Select idCategory, Category, Description, Status
From Category
Where Status = in_status
Order by Category;
END

Here is the code in .NET that calls it:
cmd.CommandText = "CALL retrieve_Categories(in_status);";
MySqlParameter newParameter = new MySqlParameter("in_status", MySqlDbType.String);
newParameter.Value = status;
cmd.Parameters.Add(newParameter);

Options: ReplyQuote


Subject
Views
Written By
Posted
ASP.NET - Unknown column 'in_status' in 'field list'
7548
September 30, 2009 10:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.