List Info

Thread: RE: Image Handling and rendering in a datagrid




RE: Image Handling and rendering in a datagrid
country flaguser name
United States
2007-02-21 20:33:12
Not sure if I can help you with your question directly, but
why would
you want to store images in SQL Server?  Why not store the
images in a
image folder and store the links to the images in SQL
Server? 


Larry Jones
Hydrel/AcuityBrands Lighting

-----Original Message-----
From: Tom Ward [mailto:Tom.Wardaptify.com] 
Sent: Wednesday, February 21, 2007 3:31 PM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Image Handling and
rendering
in a datagrid

Hello all,

Hopefully simple questions:  I need to store an image in a
database (SQL
Server) along with other fields associated to the picture. 
I would like
to get the data from the database and bind it to a grid.  My
Questions:

What is the data type you should use to store an image?

Do you have to do anything special to render that image in a
grid?

TIA

Tom


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice?
http://xmladvice.com


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

RE: Image Handling and rendering in a datagrid
country flaguser name
United States
2007-02-21 21:28:42
Not sure why you would want to, though there are some
arguments that
could be made for it...but I think you want to store as a
BLOB data type
in most databases.



On Wed, 2007-02-21 at 21:33 -0500, Jones, Larry wrote:
> Not sure if I can help you with your question directly,
but why would
> you want to store images in SQL Server?  Why not store
the images in a
> image folder and store the links to the images in SQL
Server? 
> 
> 
> Larry Jones
> Hydrel/AcuityBrands Lighting
> 
> -----Original Message-----
> From: Tom Ward [mailto:Tom.Wardaptify.com] 
> Sent: Wednesday, February 21, 2007 3:31 PM
> To: aspnet-datadisplaycontrolsaspadvice.com
> Subject: [aspnet-datadisplaycontrols] RE: Image
Handling and rendering
> in a datagrid
> 
> Hello all,
> 
> Hopefully simple questions:  I need to store an image
in a database (SQL
> Server) along with other fields associated to the
picture.  I would like
> to get the data from the database and bind it to a
grid.  My Questions:
> 
> What is the data type you should use to store an
image?
> 
> Do you have to do anything special to render that image
in a grid?
> 
> TIA
> 
> Tom
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
Need XML Advice?
> http://xmladvice.com
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

RE: Image Handling and renderingin a datagrid
country flaguser name
United States
2007-02-22 08:26:10
Yep.. Blob field is what you want to use.. but I agree with
some of the
others.. the image likely would have a better home on a file
system...
use the id column for the row of information you want to
store and name
the image the same thing and record a link to the image...
storing
things in a blob field will separate your data on the
database server,
causing more Disk I/O to happen.  If you are doing a lot of
lookups to
these information, it will cause more disk I/O, lots of
issue when you
start using the blob field.. at least in my experience...
although I've
not used it in Sql 2005... 

-----Original Message-----
From: PhilJackson [mailto:pjackson1hot.rr.com] 
Sent: Wednesday, February 21, 2007 9:29 PM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Image Handling and
renderingin
a datagrid

Not sure why you would want to, though there are some
arguments that
could be made for it...but I think you want to store as a
BLOB data type
in most databases.



On Wed, 2007-02-21 at 21:33 -0500, Jones, Larry wrote:
> Not sure if I can help you with your question directly,
but why would
> you want to store images in SQL Server?  Why not store
the images in a
> image folder and store the links to the images in SQL
Server? 
> 
> 
> Larry Jones
> Hydrel/AcuityBrands Lighting
> 
> -----Original Message-----
> From: Tom Ward [mailto:Tom.Wardaptify.com] 
> Sent: Wednesday, February 21, 2007 3:31 PM
> To: aspnet-datadisplaycontrolsaspadvice.com
> Subject: [aspnet-datadisplaycontrols] RE: Image
Handling and rendering
> in a datagrid
> 
> Hello all,
> 
> Hopefully simple questions:  I need to store an image
in a database
(SQL
> Server) along with other fields associated to the
picture.  I would
like
> to get the data from the database and bind it to a
grid.  My
Questions:
> 
> What is the data type you should use to store an
image?
> 
> Do you have to do anything special to render that image
in a grid?
> 
> TIA
> 
> Tom
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
Need XML Advice?
> http://xmladvice.com
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

RE: Image Handling and renderingin a datagrid
country flaguser name
United States
2007-02-24 19:14:55
Sorry,  but I've been out of the country for a while with no
internet access.

SQL Server has an "image" datatype. Use that.

As to why: several possible reasons. 

Reason 1: the images can be moved around (in tables) without
having to change any code
assumptions about root directory values, or values stored in
a config file.
Reason 2: the images can be distributed across servers
without a lot of complicated coding and
assumptions about root directory values (see 1)
Reason 3: the images can be part of an SQL transaction,
which might be important if the images
have some legal value.
Reason 4: the images can be backed up online, and as part of
the normal SQL backup procedures
rather than requiring a separate backup procedure which
might be forgotten (see 1,2,3).
Reason 5: the images can have more flexible security
constraints regarding who can see, modify,
etc. (see 1 and 3)

Regards,
Steven

-----Original Message-----
From: PhilJackson [mailto:pjackson1hot.rr.com] 
Sent: 21 February, 2007 7:29 PM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Image Handling and
renderingin a datagrid

Not sure why you would want to, though there are some
arguments that could be made for it...but
I think you want to store as a BLOB data type in most
databases.



On Wed, 2007-02-21 at 21:33 -0500, Jones, Larry wrote:
> Not sure if I can help you with your question directly,
but why would 
> you want to store images in SQL Server?  Why not store
the images in a 
> image folder and store the links to the images in SQL
Server?
> 
> 
> Larry Jones
> Hydrel/AcuityBrands Lighting
> 
> -----Original Message-----
> From: Tom Ward [mailto:Tom.Wardaptify.com]
> Sent: Wednesday, February 21, 2007 3:31 PM
> To: aspnet-datadisplaycontrolsaspadvice.com
> Subject: [aspnet-datadisplaycontrols] RE: Image
Handling and rendering 
> in a datagrid
> 
> Hello all,
> 
> Hopefully simple questions:  I need to store an image
in a database 
> (SQL
> Server) along with other fields associated to the
picture.  I would 
> like to get the data from the database and bind it to a
grid.  My Questions:
> 
> What is the data type you should use to store an
image?
> 
> Do you have to do anything special to render that image
in a grid?
> 
> TIA
> 
> Tom
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
Need XML Advice?
> http://xmladvice.com
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
Need XML Advice? 
> http://xmladvice.com



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

RE: Image Handling and renderingin a datagrid
country flaguser name
United States
2007-02-24 19:21:44
Does storing the image in a file somehow keep the disk I/O
less?  If the blob is stored
separately, this is logically the same as storing it in a
separate file in a different
directory. 

In most computer systems, opening a file for I/O is usually
the 2nd or 3rd most expensive
operation the system can perform.  In a modern RDBMS using
connection pooling, the blob access
ought to be significantly faster than obtaining a new file
handle, and opening/closing an
individual file for each image retrieved. 

-----Original Message-----
From: Shannon Ramirez [mailto:shannonrsucss.state.il.us] 
Sent: 22 February, 2007 6:26 AM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Image Handling and
renderingin a datagrid

Yep.. Blob field is what you want to use.. but I agree with
some of the others.. the image
likely would have a better home on a file system...
use the id column for the row of information you want to
store and name the image the same
thing and record a link to the image... storing things in a
blob field will separate your data
on the database server, causing more Disk I/O to happen.  If
you are doing a lot of lookups to
these information, it will cause more disk I/O, lots of
issue when you start using the blob
field.. at least in my experience... although I've not used
it in Sql 2005... 

-----Original Message-----
From: PhilJackson [mailto:pjackson1hot.rr.com]
Sent: Wednesday, February 21, 2007 9:29 PM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Image Handling and
renderingin a datagrid

Not sure why you would want to, though there are some
arguments that could be made for it...but
I think you want to store as a BLOB data type in most
databases.



On Wed, 2007-02-21 at 21:33 -0500, Jones, Larry wrote:
> Not sure if I can help you with your question directly,
but why would 
> you want to store images in SQL Server?  Why not store
the images in a 
> image folder and store the links to the images in SQL
Server?
> 
> 
> Larry Jones
> Hydrel/AcuityBrands Lighting
> 
> -----Original Message-----
> From: Tom Ward [mailto:Tom.Wardaptify.com]
> Sent: Wednesday, February 21, 2007 3:31 PM
> To: aspnet-datadisplaycontrolsaspadvice.com
> Subject: [aspnet-datadisplaycontrols] RE: Image
Handling and rendering 
> in a datagrid
> 
> Hello all,
> 
> Hopefully simple questions:  I need to store an image
in a database
(SQL
> Server) along with other fields associated to the
picture.  I would
like
> to get the data from the database and bind it to a
grid.  My
Questions:
> 
> What is the data type you should use to store an
image?
> 
> Do you have to do anything special to render that image
in a grid?
> 
> TIA
> 
> Tom
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
Need XML Advice?
> http://xmladvice.com
> 
> 
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
Need XML Advice? 
> http://xmladvice.com



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com


Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )