ndata插入错误 [英] error in ndata insertion

查看:113
本文介绍了ndata插入错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

字符串或二进制数据将被截断。声明已经终止。

如何解决这个问题..........

string or binary data would be truncated. the statement has been terminated.
how to solve this problem..........

推荐答案

INVOICE_EXC_DUTY1.Text(),INVOICE_E_CESS1.Text(),INVOICE_SHE_CESS1.Text(),INVOICE_TOTAL1.Text(),INVOICE_TAX1.Text(),INVOICE_A_TAX1.Text(,INVOICE_G_TOTAL.Text(),INVOICE_EXC_WORDS.Text() ,INVOICE_G_WORDS.Text(),INVOICE_PH_NO.Text()大于20个字符



INVOICE_TIN之一.Text(),INVOICE_ECC.Text(),INVOICE_RANG.Text(),INVOICE_DIV.Text(),INVOICE_COMM.Text(),INVOICE_QTY1_TOTAL.Text(),INVOICE_QTY2_TOTAL.Text()大于50个字符



INVOICE_ADD.Text()大于500个字符



你还没有提供你传递给声明的数据,所以我们无法确切地告诉你哪一个。



你可以在将数据传递到此语句之前截断数据(如何执行此操作的示例这里 [ ^ ])

或者您可以(并且应该)在达到这一点之前验证内容。



最后,这是一种格式化插入语句的错误方法 - 阅读sql注入 [ ^ ]
One of INVOICE_EXC_DUTY1.Text(),INVOICE_E_CESS1.Text(),INVOICE_SHE_CESS1.Text(),INVOICE_TOTAL1.Text(),INVOICE_TAX1.Text(), INVOICE_A_TAX1.Text(, INVOICE_G_TOTAL.Text(), INVOICE_EXC_WORDS.Text(), INVOICE_G_WORDS.Text(), INVOICE_PH_NO.Text() is greater than 20 characters
OR
one of INVOICE_TIN.Text(),INVOICE_ECC.Text(),INVOICE_RANG.Text(),INVOICE_DIV.Text(),INVOICE_COMM.Text(),INVOICE_QTY1_TOTAL.Text(),INVOICE_QTY2_TOTAL.Text() is greater than 50 characters
OR
INVOICE_ADD.Text() is greater than 500 characters

You haven't supplied the data that you are passing to the statement so we can't tell you exactly which one.

You can truncate the data before passing it into this statement (example of how to do that here[^])
or you can (and should) validate the content before you get to this point.

Lastly, this is a bad way to format an insert statement - read up on sql injection[^]


这篇关于ndata插入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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