C#.Net get SQL image datatype

J

Jason Huang

Hi,

I have a table which datatype in SQL Server 2000 is "image".
How do I get that special datatype in my C#.Net Windows Form? Given using
the SqlDataAdapter method.
Thanks for help.


Jason
 
N

Nicholas Paldino [.NET/C# MVP]

Jason,

The SqlDataAdapter should populate the data set with a byte array. You
can then just use the bytes as you wish.

Hope this helps.
 
J

Jason Huang

Thanks Nicholas!
The byte array I got is [125,0,108,0,122,0,125,0,108,0,123,0],
but when I do the SELECT command in the SQL Query Analyzer,
the output is 0x7D006C07A007D006C07B00.
What's the real READABLE value?



Nicholas Paldino said:
Jason,

The SqlDataAdapter should populate the data set with a byte array. You
can then just use the bytes as you wish.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jason Huang said:
Hi,

I have a table which datatype in SQL Server 2000 is "image".
How do I get that special datatype in my C#.Net Windows Form? Given
using the SqlDataAdapter method.
Thanks for help.


Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top