以下是sql语句:
insert into mails values( ' <[email protected]> ', '毕业设计任务 ', 'QiJd <[email protected]> ', '07-03-27 11:09 ', '032蔡汉尧 <[email protected]> ,032卢欣华 <[email protected]> ,034李硕 <[email protected]> ,034刘冰 <[email protected]> ,034马立丽 <[email protected]> ,034莫文 <[email protected]> ,034苏建浪 <[email protected]> ,034王振龙 <[email protected]> ,034徐骁巍 <[email protected]> ', ' ', ' ', ' ',1, 'D:\matrix\attaches ', '毕业设计任务暨开题内容.rar ',0)
aq.executeUpdate:[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]将截断字符串或二进制数据。
字符字段的长度我都设了varchar(100)
------解决方案--------------------
'032蔡汉尧 <[email protected]> ,032卢欣华 <[email protected]> ,034李硕 <[email protected]> ,034刘冰 <[email protected]> ,034马立丽 <[email protected]> ,034莫文 <[email protected]> ,034苏建浪 <[email protected]> ,034王振龙 <[email protected]> ,034徐骁巍 <[email protected]> ' 肯定不止100个字符吧
------解决方案--------------------
用varchar(8000)
------解决方案--------------------
varchar(100)
改長點
varchar(500)
或者
varchar(1000)
------解决方案--------------------
select len( '032蔡汉尧 <[email protected]> ,032卢欣华 <[email protected]> ,034李硕 <[email protected]> ,034刘冰 <[email protected]> ,034马立丽 <[email protected]> ,034莫文 <[email protected]> ,034苏建浪 <[email protected]> ,034王振龙 <[email protected]> ,034徐骁巍 <[email protected]> ')
结果
---
241
把字段长度改 大一些