Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 Rich Text Control

Status
Not open for further replies.

algybrown

Technical User
Sep 14, 2005
1
GB
I am trying to use the RichText control to save and load formatted text to a longtext field in a database (MySQL).

I seem to be able to save the text correctly using richtextbox1.textrtf (ie it looks like rtf text in the field when I view it generically)

ie:
db.execute "Insert into notices (Notice) values ('" & richtextbox1.textrtf & "'")

However when I read it back into a RichText control, I get the literal characters rather then the formatted text.

richtextbox1.textrtf = rs![notice]

Does anybody have any ideas how to resolve this or experience of using RichText controols in this way.

Cheers

Alan
 
peter - The only difference that would make is where the retrieved value is added?

algybrown - I would save the .TextRTF to a string before it goes to the database and then when you retrieve the value from the DB you can check to see if it's exactly the same as the one you intended to save. The reason I would ask you to do this is that I think the data must be getting changed somewhere between saving and retrieving from the MySQL DB.

I tried this with an Access DB and it worked fine for me.

Hope this helps

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top