Mysql Fatal error encountered during command execution

岁酱吖の 提交于 2019-12-11 05:43:41

问题


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;

来源:https://stackoverflow.com/questions/22265149/mysql-fatal-error-encountered-during-command-execution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!