当我运行我的Web应用程序错误生成时 [英] when i run my web application error generate

查看:87
本文介绍了当我运行我的Web应用程序错误生成时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行插入页面时出现以下错误显示

folowing error display when i run my insert page

String or binary data would be truncated.
The statement has been terminated.

推荐答案

在某个地方,您试图将数据插入到一个不足以容纳它的字段中. >
例如,您可能试图在定义为10长的字段中插入20个字符.

将日志记录添加到插入中,以便在进行实际插入之前,先记录要插入的内容,然后再记录成功标记.希望可以告诉您错误在哪里.
Somewhere, you are trying to insert data to a field that is not big enough to hold it.

For example, you may be trying to insert 20 characters to a field you defined as 10 long.

Add logging to your insert, so that before you do the actual insert, you log what you are trying to insert, and then a success marker afterwards. That should hopefully tell you where your error is.


您将覆盖数据库
中定义的列大小 就像在varchar(20)中一样,您要插入20个以上的字符:-\
You are overriding your defined column size in database
like in varchar(20) you are inserting more than 20 characters :-\


当尝试插入长度大于指定长度的数据的sql表列时,会发生这种情况.

再次遇到您面临的相同问题
此处 [
It happens when try to insert the sql table column with data having length more than the column length which you have speciifed.

The same problem which you are facing is refeered
here[^]. Hope this might help you to sort out your issue.


这篇关于当我运行我的Web应用程序错误生成时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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