I am calling a stored procedure but I can't save the return value coming from stored procedure.
My code is:
var data = db.Database.SqlQuery<rig>("exec rig_create @cid @name @crane @bop", param1, param2, param3, param4).FirstOrDefault();
I am getting the following error:
System.Data.SqlClient.SqlException: 'Incorrect syntax near '@name'.'
Thanks
尝试在参数之间使用逗号exec rig_create @cid, @name, @crane ...
Add commas between your parameters @cid @name @crane @bop
It should be like this----> @cid, @name, @crane, @bop
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.