473,836 Members | 1,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4783

I am using this in my HTML

<%# (DataBinder.Eva l(Container.Dat aItem,"DESCRIPT ION") %>

"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****@discuss ions.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.co m>
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****@discuss ions.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.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 16 '05 #4
smilly <sm****@discuss ions.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.co m>
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****@discuss ions.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.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

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


Use Encoding.GetStr ing. 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.co m>
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
7814
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 byte array and then call Loadfile method of RichTextBox and pass the stream. This works BUT IF I have more records I have to create a loop and some how pass the concatenated byte array and then pass it in a stream. I do this with
1
4015
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 does not explicitly allocate memory in a loop nor does it explicitly allocate large blocks of memory. Yet, the application’s memory footprint will grow as large as 370 MB. Rarely will it run to completion; usually, it throws an out of memory...
1
2109
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" runat="server"> <INPUT id="UploadedImageFile" runat=server type="file" size="86"> </form>
5
15823
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
1554
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 word document, but as a text with all the garbage characters (formatting, non text characters). What am I doing wrong? <%@ Page Language="VB" ContentType="text/html" trace="true"
7
4314
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 charactes, I have to use the following code to let it display on the web page: Public Function ToSCUnicode(ByVal str As String) As String Dim enc1252 As System.Text.Encoding = System.Text.Encoding.GetEncoding(1252) Dim arrByte_GBK As Byte() Dim...
0
5684
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 System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet) at TryThis.Form1.save() in C:\Documents and Settings\Nick\My Documents\...
3
5251
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 database and display it in a Image web control dynamically(at runtime). The process after being displayed in the web control, user click insert/add button, it converts the image(jpeg) file to bytes and store it the database with Image or VarBinary...
2
5264
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 bytes. How do I read each of the 20 bytes and display the data in C#?
2
6188
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 just go no where. I can see the recived data in my serial receive function but when I either raise an event with it or try to display it in a text box nothing happens. I do use beginInvoke on the text box. If I trace the code through it all...
0
9818
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9668
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10590
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4449
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4016
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3113
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.