Monday, March 19, 2012

image and text

After I upload a image file to a table with image field, how do I get the
file name? In other words if there 1000 records in one table (1000 images),
how do I know their file names?
Is there a way I can display those images in sql query analyzer using a
T-SQL command.
Using a textcopy, can I retrieve more than 1 record/1 image at a time?
ex: if there are 10 products under one category. Is there a way to retrieve
all 10 products with images using one T-sql statement, and display them on a
web page?
thanks
VigneshUhway
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
It is very good practice to store only the pathes to files located on disk.
It consumes a lot of system resource to deal with images.
There are pretty good examples provided by Microsoft to display images on
the client.

> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
The data is stored in binary format so you will not be able to see the
image.
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>|||If you are storing the images in an image data type, there is no filename,
only the PK of the row where the image is stored. If you wish to keep the
original filename and store the image in an image field, you must also
create a column to store the filename in.
Reasonable people differ on whether or not it is better to store the data in
an image field or only the filename, leaving the data in a physical file.
There are pros and cons to both methods,
Test to see which is better for you.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Uhway" <vbhadharla@.sbcglobal.net> wrote in message
news:%23rLo8Ct9EHA.3944@.TK2MSFTNGP12.phx.gbl...
> After I upload a image file to a table with image field, how do I get the
> file name? In other words if there 1000 records in one table (1000
images),
> how do I know their file names?
> Is there a way I can display those images in sql query analyzer using a
> T-SQL command.
> Using a textcopy, can I retrieve more than 1 record/1 image at a time?
> ex: if there are 10 products under one category. Is there a way to
retrieve
> all 10 products with images using one T-sql statement, and display them on
a
> web page?
>
> thanks
> Vignesh
>
>

No comments:

Post a Comment