Windows Develop Bookmark and Share   
 index > Windows Forms General > Problem in saving/select Rich Text in MySql Database.
 

Problem in saving/select Rich Text in MySql Database.

I am using .net 2005,Mysql 5.0, Mysql .net connector.

I am saving the word "Test" as rtf in mysql database. The Rtf for this word is

"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 Test\par
}"

while getting the saved text from database i am getting the text like this.
 
"{
tf1ansiansicpg1252deff0deflang1033{fonttbl{f0fnilfcharset0 Microsoft Sans Serif;}}
viewkind4uc1pardf0fs17 Testpar
}"

If i asign this rtf to Richtextbox.rtf property, I am getting the exception as
"File Format is not Valid".

DataType of the field i am using is "Longtext"...

If i use other databases like SqlServer2000,MsAccess it working fine.

What is the Solution for my problem?

vinkumar  Saturday, March 17, 2007 5:56 AM
Looks like the MySql database engine is interpreting the backslash character as the standard "C" escape character. "\r" is a carriage return. Try a MySql support forum to find out how to avoid that.
nobugz  Sunday, March 18, 2007 4:29 PM
Looks like the MySql database engine is interpreting the backslash character as the standard "C" escape character. "\r" is a carriage return. Try a MySql support forum to find out how to avoid that.
nobugz  Sunday, March 18, 2007 4:29 PM

Thank you.

Iwill try..

vinkumar  Monday, March 19, 2007 3:50 AM
H!,

Vinoth Have u got the answer ????.


je25  Monday, September 21, 2009 11:05 AM
H!,

Vinoth Have u got the answer ????.


Please tell the answer
je25  Monday, September 21, 2009 11:23 AM

You can use google to search for other answers

Custom Search

More Threads

• Data structures and algorithm analysis in C++
• Combo box and Label visibility
• Difficult question!
• How do you tell if an mdi child is open
• Resizing with step
• Help with Timer control
• Code clean up
• RichTextBox.Select method and offsets
• Could not find any resources appropriate for the specified culture or the neutral culture
• Directory.GetFiles