|
-
Apr 29th, 2001, 04:44 PM
#1
Thread Starter
Lively Member
How to save formatted text to a database?
Hi all,
I have a field of text which I want the user to be able to format
ie use tabs,bold, and underline
...and when the user is finished I want to be able to display this field on another form and save this formatted text in a field in my database.
Suspect an OLE object might do the trick but have no experience with these. Any ideas or thoughts would be appreciated.
Thanks
Jonny
-
May 1st, 2001, 04:36 PM
#2
Addicted Member
Re: How to save formatted text to a database?
Originally posted by JonnyCab
Hi all,
I have a field of text which I want the user to be able to format
ie use tabs,bold, and underline
...and when the user is finished I want to be able to display this field on another form and save this formatted text in a field in my database.
Suspect an OLE object might do the trick but have no experience with these. Any ideas or thoughts would be appreciated.
Thanks
Jonny
dunno about saving formatted strings to tables, but you can always manipulate the data that is entered...something like if the user puts in bold text, put some kind of tag or something in the string so that you know that it's bold...ie
textbox
[<b>This is bold to the VB app, but to the table it's just varchar</b>]
then just read the tags using vb but display the text according to how it should look to the user...so parse the string and you see <b> so make the textbox bold when you see it...this might not be the most elegant way, but it'll work
Ah read ur *****scope and eat some *****durrrvs!
-
May 3rd, 2001, 10:04 AM
#3
Hyperactive Member
JonnyCab,
Try using the RichText control.
I have a database that I wrote that stores all my sermons and Bible Studies (Now appraoching 7000). One of the fields in the table is the "Content" field which actually holds the formatted text of the Bible Study or Sermon.
I enter the sermon or Bible study text into the RichText Box on the data entry screen where I can format it (bold, italic, right justify, center, etc). When I save the record this is then stored in the content field for that record in the database. From another form I also have a RichTextBox along with the other fields such as date, loacation, scripture, topic, series, etc. When I select a record, the form is then populated and the appropriate information is placed in each field. The RichTextBox displays the formated sermon or Bible Study.
This sounds like the type of thing you might need. Works fine for me.
Hope this helps.
Rev. Michael L. Burns
[email protected]
-
May 3rd, 2001, 04:57 PM
#4
Thread Starter
Lively Member
Thanks for the reply...
That is pretty much what I did. I used the Richtext box with a toolbar to format the text and saved any text along with richtext formatting to a memo field in my database. I then recalled to a Richtext box when viewing and used Crystal Reports 8 to create reports.(this allows richtext interpretation for each field)
My only problem now is that the richtext formatting displayed in the crystal reports does not show when I export this to a pdf file.
Have requested help from Crystal but haven't heard back from them yet.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|