Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 25th, 2004, 09:15 AM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retaining RichTextBox Format in Database

Hello,

I am having a problem to have the formatting of my rich Text Box in a Form to be retained when I do an Insert Into Sql Statement.

The text in the RTB is saved in the Access Database but alle the Bold Face, Underline, etc... is lost when I call back the saved text from the database.

Any solution to help me with this problem?

Mark

Reply With Quote
  #2 (permalink)  
Old February 25th, 2004, 01:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I assume you are using something like:

[column1] = RichTextBox1.Text

Try:

[column1] = RichTextBox1.Rtf
Reply With Quote
  #3 (permalink)  
Old February 25th, 2004, 01:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Sorry, that was for VB.Net. I don't use VB6 very much but I think the code would look like this:

[column1] = RichTextBox1.TextRTF

J
Reply With Quote
  #4 (permalink)  
Old February 25th, 2004, 01:44 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Putting it is just an insert into Table (Column) Values (RichtextBoxNotes.TextRtf)


Pulling the data is done like this:

Set FormBonCommande.RichTextBoxNotes.DataSource = RsTitre2
FormBonCommande.RichTextBoxNotes.DataField = "Description"

FormBonCommande.RichTextBoxNotes.TextRTF = RsTitre2.Fields("Description").Value

This still does not work.

Reply With Quote
  #5 (permalink)  
Old February 25th, 2004, 02:06 PM
Authorized User
 
Join Date: Feb 2004
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I might have found a solution. I can use the MEMO field instead of OLE Object in the database or Plain TExt to retain the format of the RichTextBox.

However with MEMO I am limited with 65,000 characters in the RTB.

Thanks for your advices and if you get anything better let me know.

Mark

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access database database format itHighway Access 0 February 24th, 2008 05:34 PM
Format retaining... rupen Crystal Reports 0 April 4th, 2007 01:35 PM
Unrecognized Database Format Apocolypse2005 Beginning VB 6 2 September 29th, 2006 11:35 AM
Unrecognised database format ppenn Access 0 November 18th, 2004 05:59 AM
RichTextBox with Access Database kooltmd VB How-To 1 April 21st, 2004 06:52 AM



All times are GMT -4. The time now is 01:14 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.