环球网校是美国纳斯达克上市企业欢聚时代(NASDAQ:YY)旗下品牌 | 住房和城乡建设部 建筑人才培训合作单位
您现在的位置在: > 计算机类 > 计算机等级考试 > 考试辅导 >

特殊字符ORA-01480错误的处理

2010-06-25 来源:互联网 作者:第一考试网

  今天研发同事询问,超长字符串无法INSERT到数据库。但是长度距离VARCHAR2的上限还有很多。只有1700多个字符。

#

  检查这个字符按串和对应的错误。发现很怪异,是ORA-01480错误。

#

  看看这个错误:

#

  01480, 00000, "trailing null missing from STR bind value"
  // *Cause:    A bind variable of type 5 (null-terminated string) does
  //                 not contain the terminating null in its buffer.
  // *Action: Terminate the string with a null character #

  原来字符串中包含&这个特殊字符,所以我们需要“处理”这个特殊的字符。

#

  可将CHR(38)可以将这个&特殊字符串转换。

#

  通过这种转换,含有多个这样特殊字符的字符串可以成功插入数据库。

#

责编: 返回顶部  打印

关于我们联系我们友情链接网站声明网站地图广告服务帮助中心