Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 February 12th, 2005, 07:30 PM
Authorized User
 
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to hlchuah77
Default How to insert and retrieve image?

I am going mad to look else where for the solution. From the web, I know that I must use a pointer which is pointing to a image location so that I can manipulate it. But the problem is how this can be done? I want to retrieve the image from a file location then display it in browser. Can any one give me your suggestion? Any suggestion and opinion is greatly appreciated.

Thanks.

 
Old February 12th, 2005, 10:05 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

For the image tag set the src attribute to that of the file location.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old February 13th, 2005, 02:15 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

i think you use pointer when reading binary from db image field

first you get the pointer for the starting of img field:
SELECT @Pointer=TEXTPTR(ImgSrc) FROM ImgTable

then you read binary data using:
READTEXT empimg.imgsrc @Pointer @Offset @Size HOLDLOCK

Ahmed Ali
Software Developer
 
Old February 13th, 2005, 11:41 AM
Authorized User
 
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to hlchuah77
Default

Thanks for replying.

I forget one thing where I don't know how to store the image path in sql server. For simplicity, I use enterprise manager to create table. Once I have set the data type to image, what is the next step? What I mean is if I set the data type field to varchar, then I can type anything alphanumeric characters into the table, so how about image data type? Is it type in a location such as this => <C:\folder1\folder2\filename> into the table field?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve and Display Image asters .NET Framework 1.x 0 September 18th, 2008 03:56 AM
Retrieve image data from mysql db vermaarun2005 PHP Databases 0 July 14th, 2007 11:12 AM
Insert Record & retrieve ID gundulf ADO.NET 5 July 12th, 2007 10:03 PM
Retrieve data from AD and insert into sheet stefbol Excel VBA 0 September 13th, 2006 09:49 AM
How to store image in oracle database and retrieve y.suresh JSP Basics 1 February 28th, 2005 07:01 AM





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