将多行值从文本框插入数据库 [英] Insert a multiline value from textbox into database

查看:150
本文介绍了将多行值从文本框插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有这种情况。我想要一个多行文本框值,例如:地址将保存到数据库中。当我想要编辑回信息时,它将在插入时显示为多行相同。有人可以帮我提供一个链接来继续我的代码吗?或者你对MySQL数据库是否可以保存多行值有任何建议?

Hi all,

I have a situation here. I want a multiline textbox value eg: Address will be save into database. Which when I want to edit back the info, it will be displayed as multiline same from when inserting it. Could someone help me to give a link to continue my code? or do you have any suggestion for MySQL database whether it can save multiline value?

推荐答案

你可以为此参数化查询,请看这个链接:

http://msdn.microsoft.com/en-us/ library / system.data.sqlclient.sqlcommand.parameters.aspx [ ^ ]
You can parameterized query for this, see this link:
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx[^]


我有同样的问题,除了我要插入的多值在数据库中保持空白它让我疯了,我几乎尝试了一切,并且增加了我的问题,查询执行没有一个错误....
i have the damn same problem except the multine value that i want to insert remain blank in the database it's driving me nuts and i tried almost everything and to increase my problem the query execute without a single error....


这篇关于将多行值从文本框插入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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