Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
| Search | Today's Posts | Mark Forums Read
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 March 6th, 2007, 05:10 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert Text(Sql Server Text Field) to Image(JPG)

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 August 16th, 2008, 06:39 AM
Registered User
 
Join Date: Aug 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Even I am having same problem. Please help me in this if you have got the solution. I am getting Black Images

 
Old February 13th, 2009, 06:31 PM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting Text in an Image Field to Readable Text.

Here is a solution. This is a scalar function that will convert 8000 bytes of the image to a variable.

createFUNCTION ImageToText
(
-- Add the parameters for the function here
@filedata image
)
RETURNSvarchar(8000)
AS
BEGIN
RETURNconvert(varchar(8000),convert(binary(8000), @filedata ))
END
GO



select dbo.imagetotext(filedata)from filelibrary

NULL
NULL
NULL (the first three records are null values)
test data





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert datatype Text to image roopaksr ADO.NET 2 September 6th, 2008 03:02 PM
Convert from Image to Text niallhannon SQL Server 2000 9 February 24th, 2007 02:17 PM
formatting a text field in sql server ttbhandari SQL Server DTS 1 October 2nd, 2004 01:06 AM
Convert RTF Text to ASCII Text LouSchweichler Access 2 December 3rd, 2003 03:50 PM





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