HI
I am using the following code to call the stored procedure and I am getting the errror the
The function or routine not found in the databasebut it is in the database and it works well when i restart my solution pl check my Stored procedures and tell me where i went wrong
public DataTable getPermanentAddress(string strAssID)
{
//strCon.Open();
DataTable dtAddress = new DataTable();
strCon = new MySqlConnection(strConnection);
strCon.Open();
MySqlCommand cmdPermanentAddress = strCon.CreateCommand();//new MySqlCommand("sp_getPermanentAddress", strCon);
try
{
cmdPermanentAddress.CommandText = "sp_getPermanentAddress";
MySqlDataAdapter daPermanentAddress = new MySqlDataAdapter(cmdPermanentAddress);
daPermanentAddress.SelectCommand.Parameters.Add("@AssociateId",MySqlDbType.Int32).Value = strAssID.ToString().Trim();
daPermanentAddress.SelectCommand.CommandType = CommandType.StoredProcedure;
daPermanentAddress.Fill(dtAddress);
return dtAddress;
}
catch (Exception ex)
{
throw (ex);
}
finally
{
if (strCon.State == ConnectionState.Open)
{
cmdPermanentAddress.Dispose();
strCon.Close();
strCon.Dispose();
}
}
}
My routine
- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_getPermanentAddress`(In AssociateId integer)
BEGIN
select permanent_add from associate_details where associate_id = AssociateId;
END
Pl tell where is the issue its very urgent