SqlParameter未提供 [英] SqlParameter Was not supplied

查看:70
本文介绍了SqlParameter未提供的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到SqlParameter" Revision"没有供应。你能帮我解决错误所在吗?

I get an error that the SqlParameter "Revision" was not supplied. Could you assist me with what the error is talking about?

sqlResult = 0;
sqlCommand = @"Insert INTO dbo.ControlObjects (INSTALLATION, Revision, OBJNAM, [Key], Value, Deleted, ParamType)" +
              "VALUES (@INSTALLATION, @Revision, @OBJNAM, @Key, @Value, @Deleted, @ParamType)";

sqlResult = this.Database.ExecuteSqlCommand(sqlCommand, 
                                            new SqlParameter("@INSTALLATION", installationId),
                                            new SqlParameter("@Revision", 0L), 
                                            new SqlParameter("@OBJNAM", objName),
                                            new SqlParameter("@Key", key),
                                            new SqlParameter("@Value", value),
                                            new SqlParameter("@Deleted", false), 
                                            new SqlParameter("@ParamType", "Saved")); 




  


  

pianoboyCoder

pianoboyCoder

推荐答案

我收到的错误如下。该错误表示'Key'的语法无效。我没有看到这个问题。有人可以告诉我我做错了什么。

I am getting an error below. The error says invalid syntax by 'Key' . I do not see the issue. Can somebody tell me what I am doing wrong.





这篇关于SqlParameter未提供的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆