This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 从一个web page form 中收集数据放在数据库中,用了struts,
为什么数据库只能得到第一行的字符,后续行没有上去。数据库的field VARCHAR, lenght 255,有人知道为什么吗, thank u.从一个web page form 中收集数据放在数据库中,用了struts,
<td><html:textarea name="feedbackForm" property="feedbackValue.comments" rows="12" /></td>
为什么数据库只能得到第一行的字符,后续行没有上去。数据库的field VARCHAR, lenght 255,有人知道为什么吗?谢谢
-studying2(彷徨者);
2004-3-24
{266}
(#1657998@0)
-
建议先移去struts里面的Tag,直接用标准Html的试试,以定位错误是出在front-end还是back-end.然后一步步细化定位错误,应该很容易找到。Good luck!
-fatbean(happylife);
2004-3-24
(#1658035@0)
-
what database do you use?in Action,you can use System.out.println to print out actionform to see if action can accept multi-line,probably your database regard "\n" as string terminator.
-easyway(漂流);
2004-3-24
(#1658085@0)
-
I use mysql. any suggestion? by the way, How can I let action form accept multiline? thank u.
-studying2(彷徨者);
2004-3-25
(#1658583@0)
-
I think your Action is ok ,you need replace "\n" with other character such as "|",before you save to database. when retrieve from database convert "|" to "\n" whenever it is needed to display it.
-easyway(中);
2004-3-25
(#1658691@0)
-
非常感谢各位。
-studying2(彷徨者);
2004-3-31
(#1666534@0)