0

Is there any way I can convert data to varbinary with some specific format while I try to save data in SQL Server table. Like if the data is coming from RTF editor. We use OpenXmlBytes for storing data into database from frontend and pass as bytes to stored procedure. Can the same be achieved to update data in the table in varbinary format with OpenXmlBytes ?

I am using Devexpress RichEditControl to save the data. As mentioned, I convert the data into using OpenXmlBytes.

As follows,

DevExpress.XtraRichEdit.RichEditControl rtf = new DevExpress.XtraRichEdit.RichEditControl();

byte[] strRemark = rtf .Document.OpenXmlBytes;

Can I achieve the same in SQL server?

Nik
  • 61
  • 7
  • byte array is just a byte array. there is no "format". varbinary holds that byte array. – Ahmed ilyas Nov 06 '15 at 07:58
  • @Ahmedilyas I don't really think so. Also the format depends. I am facing same problem in the application. – Nik Nov 06 '15 at 08:02
  • I had converted data from ntext datatype to varbinary(max) – Nik Nov 06 '15 at 08:03
  • So you are saying you had store data as ntext first and now you want to store it as varbinary? – Ahmed ilyas Nov 06 '15 at 11:31
  • Initially it was ntext, I have converted it to varbinary(max). But Im facing problem to convert the data in front end. I am using RichEditControl (Devexpress) to save data. For the data that is saved from this control converison works fine, as Im displaying data in XRRichTextBox. But for already saved data, this conversion fails. And data is shown as blank in the XRReport – Nik Nov 06 '15 at 11:37

0 Answers0