Mysql Fatal error encountered during command execu

2019-08-09 08:46发布

I got the following error while calling a stored procedure in asp.net c#page. I could not understand the error details. Please help me to solve this.

MySqlCommand cmd =
    new MySqlCommand("CALL sp_wrt_test(10, @param);SELECT @param", connection);

cmd.CommandTimeout = 5000000;

//Assign the query using CommandType7
using (IDataReader reader = cmd.ExecuteReader())
{
    if (reader.Read())
        id = "@param = " + reader[0];
}


create procedure sp_wrt_test(in name varchar(100), out retval varchar(200))
begin
 insert into hd_test(fld_name) values(name);
 select max(fld_id)into retval from hd_test;
end;

0条回答
登录 后发表回答