Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 16th, 2008, 07:16 AM
Registered User
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert datatype Text to image

Dear friends,
I have one column in SQL Server 2000, and this column datatype is text. I am storing as string in this filed, this string was converted from Image. Now I have to convert from this text to Image and copy the image into hard disk. How to do this procedure?

Old September 6th, 2008, 07:00 AM
Posts: n/a

What do you mean by these two lines? Can you please elaborate?
I am storing as string in this filed, this string was converted from Image.
Old September 6th, 2008, 03:02 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

If you mean you made a mistake and stored the binary data as string in a TEXT field, you may be stuck. There is no guarantee that the binary data was stored correctly and not transformed via the current encoding to a string.

But you could *try*. Just change the field type from TEXT to VARBINARY (or BLOB or whatever) and see if it works. But don't be surprised if it doesn't.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Text(Sql Server Text Field) to Image(JPG) srinivas72 ADO.NET 2 February 13th, 2009 06:31 PM
convert datatype stealthdevil Access VBA 3 August 15th, 2007 02:15 PM
Convert from Image to Text niallhannon SQL Server 2000 9 February 24th, 2007 02:17 PM
Image Datatype in page kdefilip Classic ASP Databases 1 July 3rd, 2005 02:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.