不允许从数据类型varchar(max)到varbinary(max)的隐式转换。使用CONVERT函数运行此查询。 [英] Implicit conversion from data type varchar(max) to varbinary(max) is not allowed. Use the CONVERT function to run this query.

查看:1549
本文介绍了不允许从数据类型varchar(max)到varbinary(max)的隐式转换。使用CONVERT函数运行此查询。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





有谁能知道如何解决这个错误?





不允许从数据类型varchar(max)到varbinary(max)的隐式转换。使用CONVERT函数运行此查询。



查询:



Can anyone know how to solve this error?


Implicit conversion from data type varchar(max) to varbinary(max) is not allowed. Use the CONVERT function to run this query.

query:

ALTER procedure [dbo].[pupusrresume]
(
@loginemailid varchar(30),
@resume varchar(MAX)
)
as
begin
update tbl_register set
resume=@resume
where 
loginemailid=@loginemailid
end

推荐答案

您对其中一个变量使用了错误的类型规范。检查数据库表定义并更正您的查询。
You are using the wrong type specification for one of your variables. Check your Database table definition and correct your query.


ALTER procedure [dbo].[pupusrresume]
(
    @loginemailid varchar(30),
    @resume varbinary(MAX)
)
as
begin
    update tbl_register set
    resume=@resume
    where 
    loginemailid=@loginemailid
end






您已将@loginemailid和@resume都声明为varchar,但根据您的错误消息,它看起来喜欢两者或任何一个表tbl_register中的相关列是varbinary类型。

要么更改相关变量的数据类型,要么使用Convert / cast来更改数据类型。
Hi,

you have declared @loginemailid and @resume both as varchar, but according to your error message it looks like both or any one of the concerned column(s) in table tbl_register is of varbinary type.
either you change the data type of concerned variable or use Convert/cast to change datatype.


这篇关于不允许从数据类型varchar(max)到varbinary(max)的隐式转换。使用CONVERT函数运行此查询。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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