I believe you may need to change the data type of that field in SQL to binary, then convert the rtf text/input to binary before insertion. (get the bytes). Then to read it and put it back in, convert it back to string.
Thing is, you need to know the length of data for that field in SQL. I have been able to do it but thats because I Was doing a simple test and knew how much data to give one entry. If you are interested, I can post the code I used for inserting this, and reading back, from SQL I'm sure there is a better way.
One other way would be to get the bytes[] of the File used to load into the RTB control, and store that into SQL, then when reading, get the bytes[] and write to file or memorystream, then load it into the RTB control. I think this may not be a bad idea but could be wrong
|