The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
Has anyone managed to use the SaveToStream method to save to a sql server database.
I can output the stream but each line with a carriage return on it seems to have 256 bytes padded with 0x0 and when the document is read back in from the db these are shown as little squares!
Any ideas?
ADAdministrator Syncfusion Team May 5, 2006 01:59 PM UTC
Hi James,
Your Direct-Trac incident 25303 in this regard has been updated. Please refer to my response there and let me know if you need any other information.
We appreciate your interest in Essential Edit.
Regards,
Ebenezer.P
JAJamesMay 8, 2006 05:05 PM UTC
OK - for any of you wanting to know the solution here it is. This is now working thanks on part to the help of the tech support guys.
To Save the contents of an editControl :-
byte[] b = null;
ASCIIEncoding ae = new ASCIIEncoding();
b = ae.GetBytes(this.editControl1.Text);
I can then assign the value of b directly to my parameter in my stored procedure (which is sql sever "image" type).
To restore the contents :-
System.Data.SqlClient.SqlDataReader MyReader = cmdOpenMacro.ExecuteReader(CommandBehavior.CloseConnection);
if (MyReader.Read())
{
Stream s = new MemoryStream((byte[])MyReader.GetValue(0));
editControl1.LoadStream(s, editControl1.Configurator[ "MyLanguage" ]);
}
Hope that helps anyone else struggling with this one!
Cheers.
James.