473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Display System.Byte[] text data

This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]
Nov 16 '05 #1
6 4760

I am using this in my HTML

<%# (DataBinder.Eval(Container.DataItem,"DESCRIPTION") %>

"smilly" wrote:
This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]

Nov 16 '05 #2
smilly <sm****@discussions.microsoft.com> wrote:
This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]


Well, Image is a type for binary data. How are you converting the text
into a binary form in the first place? If you're using an Encoding, use
the same Encoding in reverse to get back to a string.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
I am using Delphi 6 using ADO to store the data we are in conversion to a
thin client what path should I take to get the data out?

"Jon Skeet [C# MVP]" wrote:
smilly <sm****@discussions.microsoft.com> wrote:
This field is bound to a image data type in SQL server that is used to house
big amounts of text how can I output the text data because right now I am
getting

System.Byte[]


Well, Image is a type for binary data. How are you converting the text
into a binary form in the first place? If you're using an Encoding, use
the same Encoding in reverse to get back to a string.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #4
smilly <sm****@discussions.microsoft.com> wrote:
I am using Delphi 6 using ADO to store the data we are in conversion to a
thin client what path should I take to get the data out?


You'll need to find out exactly what conversion Delphi or ADO is
making, I'm afraid. Hopefully it's just a normal text encoding. I
suggest you try a few sample strings from Delphi and see how they come
out - look at the binary data and try to work out what encoding it is.
For instance, if every other byte is a 0, chances are it's a UCS-2 or
UTF-16 encoding.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #5

can you give an example of how to decode such data?

"Jon Skeet [C# MVP]" wrote:
smilly <sm****@discussions.microsoft.com> wrote:
I am using Delphi 6 using ADO to store the data we are in conversion to a
thin client what path should I take to get the data out?


You'll need to find out exactly what conversion Delphi or ADO is
making, I'm afraid. Hopefully it's just a normal text encoding. I
suggest you try a few sample strings from Delphi and see how they come
out - look at the binary data and try to work out what encoding it is.
For instance, if every other byte is a 0, chances are it's a UCS-2 or
UTF-16 encoding.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #6
smilly <sm****@discussions.microsoft.com> wrote:
can you give an example of how to decode such data?


Use Encoding.GetString. I strongly recommend that you read up on
encodings first though. Here's a starting point:
http://www.pobox.com/~skeet/csharp/unicode.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nitin8or | last post by:
Hi ALL, I want to display in a RichTextBox the Binary Large Objects data coming from database. If I have one record its not a problem I convert it to byte array and pass it on in a stream as a...
1
by: lwickland | last post by:
Summary: System.Net.ScatterGatherBuffers.MemoryChuck allocates inordinately large bytes when sending large post data. The following application consumes inordinate quantities of memory. My code...
1
by: Adam | last post by:
I am having difficulty retrieving images from a SQL database. Here is the code I use to UPLOAD the image to the database: <form id="Form1" method="post" enctype="multipart/form-data"...
5
by: David Elliott | last post by:
I need a control on a Web Page that can accept an HTML Document and will display it. Any help would be appreciated. Thanks, Dave Here is what I was trying...
1
by: tfs | last post by:
I have a word file stored in an SQL database and am trying to read and display on my ASP.Net page. It seems to work OK as far as reading and displaying on the page, but it is not displaying as a...
7
by: c.verma | last post by:
I have a web application. There is a page which has a datagrid on it.The datagrid displays the data that comes from SAP. SAP sends the chinese characters to this grid. Before I display CHinese...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
3
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
2
by: Tim2Be | last post by:
I have a text file that has a length of 840 bytes. I need to split into 20 bytes starting from byte 1. If there are data in any of the 20 bytes, I display the data. So there are 42 occurences of 20...
2
by: Lou | last post by:
I have a class that creates an instance of the seril Port. Every thing works fine except whenever I receive data I cannot display the recieved data. I get no errors but the recived data seems to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.