473,779 Members | 2,038 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 4780

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
7813
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
4013
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
2106
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
15820
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
1552
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
4313
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
5676
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
5245
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
5262
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
6184
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
10138
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
10074
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
9930
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
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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
3
2869
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.