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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get formatted text from VB box into sql field

Status
Not open for further replies.

basbrian

Programmer
Feb 18, 2002
49
AU
I have a richtext box(on a visual studio 2008 form) that I copy & paste formatted text from a word doc in to. I want to be able to save this to a sql server 2005 DB field. I then want to read this field and put it into a word doc with its formatting.

Problem 1 - How do I get a formatting toolbar on the RTBox?

Problem 2 - what is the best data type to use in sql?

Problem 3 - if I move the RTBox data to a vb.net field. how should I define it?

 
1) There isn't one so you would have to make it with a tool strip of some type and you can't put it on an RTB. You would put both on a form or in a container on the form and just put them next to each other.
2) I was reading and I heard text is supposed to go away so varchar.
3) This question doesn't make any sense. VB.net field?

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Sorry for the confusion. What I meant was -

Code:
Dim fdesc as string 'should this be string or something else

fdesc = me.form1_desc.rtf 'richtextbox on form

 
If you want to keep the formatting then yes go with a string and pull the .rtf.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top