从字符串转换为uniqueidentifier时转换失败。 [英] Conversion failed when converting from a character string to uniqueidentifier.

查看:1342
本文介绍了从字符串转换为uniqueidentifier时转换失败。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从字符串转换为uniqueidentifier时转换失败。如何处理此错误

Conversion failed when converting from a character string to uniqueidentifier.How to handle this error

推荐答案

从字符串转换为uniqueidentifier时转换失败。

当您尝试将无效字符串转换为uniqueidentifier 错误消息$ c>。



后果:

可以解析T-SQL语句,但会在运行时导致错误。



分辨率:

严重级别16的错误由用户生成且可以识别由用户。声明不能以这种方式运行。只有有效的字符串才能转换为uniqueidentifier。



在出现此错误的地方提供代码来解决它。
Conversion failed when converting from a character string to uniqueidentifier.
This error message appears when you try to convert an invalid character string to uniqueidentifier.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
Error of the Severity level 16 are generated by the user and are corrigible by the user. The statement cannot be run this way. Only valid character strings can be converted to uniqueidentifier.

Provide your code where you got this error to resolve it.


' 0f86759f-db8d-47dd-b862-8500afc1bf7e666'不是有效的Guid,很容易看出:字节被编码为十六进制数,因此每个字节占用两个字符。现在计算每个块中的字符:最后一个块有一个奇数。
'0f86759f-db8d-47dd-b862-8500afc1bf7e666' is not a valid Guid, that's easy to see: bytes are encoded as hexadecimal numbers, hence every byte takes up two characters. And now count the characters in each block: the last block has an odd number.


这篇关于从字符串转换为uniqueidentifier时转换失败。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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