如何在Access2010中保存RichTextBox内容 [英] How to save RichTextBox content in Access2010
问题描述
我正在创建一个词典系统,其中的单词含义可以在RichTextBox
中编辑(用于用户定义FontSize,Color等...)
那么我如何以RTF格式将有意义的RichTextBox
内容保存在Access数据库中?而我该如何阅读呢?
Access 2007/2010/2013中的本机富文本使用HTML的一部分,而不是RTF,因此除非您希望在以下情况下转换为RTF加载/保存数据后,您将不得不寻找另一种方式来存储格式化的文本.
由于WPF RichText控件使用RTF,所以将数据保存在Access数据库中的最佳方法可能是使用二进制Blob. I'm creating a dictionary system, where words meaning is editable in So how to can I save meaning Native Rich text in Access 2007/2010/2013 uses a subset of HTML, not RTF, so unless you want to convert to/from RTF<>HTML when you load/save your data, you will have to find another way to store your formatted text. Since the WPF RichText control uses RTF, the best way to save data in an Access database would probably be to use a binary blob. If you want to be able to do a text search on the text entered through the RichText control, you should probably add another To work with attachments from .Net, here are a couple related questions: 这篇关于如何在Access2010中保存RichTextBox内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
在Access中,您可以使用OLE Object
数据类型,或者更好的是使用新的如何使用Microsoft Access数据库的附件数据类型? /a>
RichTextBox
(for user define FontSize, Color, etc...)RichTextBox
content in the Access database in RTF format? And how to can I read this?
In Access, you can do this either by using the OLE Object
data type or, better, the new Attachment
data type.Memo
field to your database containing the cleaned-up, pure-text version of the data.