Tuesday, December 29, 2009

Storing Images in Database Table by using SQL

You can easily store images in database table do the following steps.......

*First create myTable using this quary

CREATE TABLE myTable(Document varbinary(max))

*After that insert images into following table

INSERT INTO myTable
SELECT bulkcolumn FROM OPENROWSET
(BULK 'C:\cute-baby-5909.jpg', SINGLE_BLOB) as blob


here the images are store in varbinary formate this is backend procedure for storing images.....
Hope so your image is stored in table

No comments:

Post a Comment