Hi!,
I am storing the Richtextbox(some bolded text) values using 'richtextbox1.rtf' in MySQL.
con.Open()
com = New OdbcCommand("delete from table1", con)
com = New OdbcCommand("insert into table1 values('" & RichTextBox1.Rtf & "')", con)
com.ExecuteNonQuery()
con.Close()
---------------------------------------
After retrieving the values from DB, I will try to displaly using ths code 'Richtextbox1.rtf=dt.rows(0).item(0).tostring'.
con.Open()
adp = New OdbcDataAdapter("select * from table1", con)
con.Close()
dset.Tables.Clear()
adp.Fill(dset)
If Not dset.Tables(0).Rows.Count = 0 Then
'Dim str As String = dset.Tables(0).Rows(0).Item(0).ToString
'RichTextBox2.Text = str
'Here I have to use like this. It show an error 'File Format is not Valid'
RichTextBox2.Rtf = dset.Tables(0).Rows(0).Item(0).ToString
End If
But I got an error like ' File Format is not Valid '.
If anybody know kindly reply to me. Its very urgent.
Please.
How could store and retrieve the Bolded text in richtextbox in MySql using VB.Net
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Master BillaRank #2,229 · 630 reputationPosted Sep 17, 2009, 7:22 AM EDT
can you post complete code to save and retrieve and display text in rich text box.
thank you
Jesupriyan10 reputationPosted Sep 21, 2009, 9:30 PM EDT
I DON'T want to use any file concepts for storing the values.