且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用SaveFileDialog将Image保存到SQL Server数据库中

更新时间:2023-02-07 10:46:33

您提供的错误消息表明预期参数为@ ASAm_FIRMA_PRES_JD''但您在示例代码中显示您将参数名称设置为ASAM_FIRMA。



添加参数时使用的名称必须为匹配SQL的名称服务器期望。_ PRES_JD在SQL Server期望的末尾,但在调用AddWithValue方法时不在参数名称的末尾。
The error message that you provided says that the expected parameter is "@ASAm_FIRMA_PRES_JD'' but you show in your example code that you are setting the parameter name to "ASAM_FIRMA".

The name that you use when you add the paramater has to match the name that the SQL Server expects. "_PRES_JD" is on the end of what the SQL Server expects but is not on the end of the parameter name when you call the AddWithValue method.