有sql语句从工作班得很好但是当我使用它c#代码我收到此错误
{“在命令执行期间遇到致命错误。”} {“必须定义参数'@receiverID'。”}
sql是
INSERT INTO arabaicsms.receivers
(Name,Phone,Email)
VALUES
(@Name,@Phone,@Email);
SET @receiverID = (SELECT MAX(ID) FROM arabaicsms.receivers);
INSERT INTO arabaicsms.roles_recivers
(FkRolesID,FkReceiversID)
VALUES
(1, @receiverID), (8, @receiverID) ;
INSERT INTO arabaicsms.receiver_classes
(FkRevceiverID,FkClassesID)
VALUES
(@receiverID, 50) ;
INSERT INTO arabaicsms.groups_recivers
(FkGroupsID,FkReceiversID)
VALUES
(4,@receiverID),(5,@receiverID);
SELECT @receiverID
不是什么可能是问题,但任何想法都赞赏