Problem ocures with procedure both via code or Command generator - execute query also does not work ;(
When using SQL comand line it works fine:
Code: Select all
CREATE PROCEDURE `sp_CreateBillNumber`(OUT billNumber varchar(20)) ...........
call sp_CreateBillNumber(@a);
select @a;
Code: Select all
this.cmdSel_miscellaneus.Parameters.Clear();
this.cmdSel_miscellaneus.ParameterCheck = true;
this.cmdSel_miscellaneus.CommandType = System.Data.CommandType.StoredProcedure;
MySqlParameter myRetParam = new MySqlParameter();
myRetParam.Direction = System.Data.ParameterDirection.Output;
myRetParam.ParameterName = "billNumber";
this.cmdSel_miscellaneus.Parameters.Add(myRetParam);
this.cmdSel_miscellaneus.CommandText = "sp_CreateBillNumber";
// here I got an !!!_E_R_R_O_R_!!! with such message:
// "OUT or INOUT argument 1 for routine db.sp_CreateBillNumber is not a variable"
this.cmdSel_miscellaneus.ExecuteNonQuery();