hello,
I want to get documents from sqlserver without lossing original format into multiline text box .I had tried below code but i lossed my original format can u guide me or send snippets. can u tell where i done mistake
database:sqlserver 2008
document column name: fcontent varbinary(max)
string connectionString = ConfigurationManager.ConnectionStrings["uploadConnectionString"].ConnectionString;
connection = new SqlConnection(connectionString);
connection.Open();
SqlCommand cmd = new SqlCommand("select fcontent from files where id=@id", connection);
cmd.Parameters.Add("@id", SqlDbType.Int).Value = 2;
byte[] resume = (byte[])cmd.ExecuteScalar();
String text = System.Text.Encoding.UTF8.GetString(resume);
TextBox1.Text = text;
connection.Close();
}
Name : V.KRISHNAVENI
Father�s Name : V.CHINNA VENKAIAH
Date of Birth : 22-05-1990
Sex : Female
Marital status : Single
Nationality : Indian
Languages Known : English, Telugu
Permanent Address : V.KRISHNAVENI,
D/O V.Chinna Venkaiah,
Peddagopathi(V),
Konijerla(M),
KHAMMAM(D).
I do here by declare that the above details are true to the best of my knowledge and belief.
Date:
Place:
KRISHNAVENI VADDE
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������)��5��>��?��a��f��g��h��z�����; ��L ��M ��z ��| ��� ��� ��� ��� ��� ��� ��� ��� �����������ם�~�n`R`RDR`R`��h[SW�B*"OJ��QJ��^J��ph����h�`��B*"OJ��QJ��^J��ph����h�iA�B*"OJ��QJ��^J��ph����h�iA�5�B*"OJ��QJ��^J��ph�����)h�iA�5�B*"CJ�OJ�QJ�\�^J�aJ�ph����h�iA�OJ��QJ��^J���h�iA�OJ'�QJ'�^J'��,h�iA�5�CJ�OJ�QJ�\�^J�aJ�mH�nH�sH��j����h�iA�U" h�`��5�CJ�OJ�QJ�\�^J�aJ�� h�iA�5�CJ�OJ�QJ�\�^J�aJ��h�iA�5�CJ�\�aJ��h�iA�5�>*CJ �\�aJ ���������*��?��f��h��z��|��; ��L ��M ��N ��U ��V ��W ��g ��h ��m ��n ��z �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
��$"$"G$�If"���a$"���$��'dh""�`��'a$�"���"�$"
&F��
������dh""����$"a$"�z ��{ ��| ��� ��� ��� ��� ��Y������������N������������N������������N������������@������������N�����������������������������������
��$"$"G$�If"���a$"gd[SW��
��$"$"G$�If"���a$"����kd����$"$"If"����H'�\�����}�!�v""�""�""�������
""�""�""�������""�""�""������ ""�""�""�""� ��'�'�'�'�(�����������������������������������������"����������������������������������������������������������������������������4��"��4��"
l�a���p�(������������������������������������������ ��� ��� ��� ��� ��� ��� ��� ������������������������������������������������������@�����������������������������������������������kd "��$"$"If"����%'�\�����}�!�v""�""�""�������
""�""�""�������""�""�""������ ""�""�""�""� ��"�"�"�"�(�����������������������������������������"����������������������������������������������������������������������������4��"��4��"
l�a���p�(�����������������������������������������
��$"$"G$�If"���a$"�
��$"$"G$�If"���a$"gd�`���� ��� ��� ��� ��� ��� ��� ��� ��
��
��
��
��
��
��
��
��7
��8
��P
��Q
��W
��b
��n
��~
���
���
���
���
���
���
���
�����������������ʷ���㦇㦇�yd����������������������������������������������)h���5�B*"CJ�OJ�QJ�\�^J�aJ�ph����h�}�B*"OJ��QJ��^J��ph����hgm��B*"OJ��QJ��^J��ph����!