Loading and saving an rtf file from mysql database

W

Waqas.L.Khan

Hi Guys,

I'm doing some work with richtextboxes and want to be able to save and
load the content from them to a mysql database (including all
formatting). I figured the best way to do this would be to save the
contant of the rtb to an rtf file and then load the file into a mysql
BLOB field:

Public Sub savetoDB()

Dim mysqldb As ADODB.Connection = New ADODB.Connection
mysqldb.Open(".......connection string....")
mysqldb.Execute("INSERT INTO table123 (content) VALUES
("LOAD_FILE('C:/test.rtf'))")
mysqldb.Close()

End Sub

The problem is that I don't know any way to extract the rtf from the
BLOB field and place it back into the file. I've tried looking into the
mysql forums but I'm not getting much help. Any help you can provide
would be appreciated.

Thanks,
Waqas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top