save images to db

alqous.com

New member
Joined
Sep 10, 2005
Messages
2
Programming Experience
1-3
I was created a database with sqlserver on of the fields is picture ....

My quistion is : how i can save or insert an image in my database?

Regard
 
Last edited by a moderator:
First of all please choose and indicated topic namd the next time
second you can use field of data type Image
here is a stored procedure sample for that
VB.NET:
CREATE PROCEDURE InsertImgData 
@ImgID as int,--image id
@ImgType as nvarchar(50),--String holds the image type
@MyIMG AS image --the image it self
AS
insert into images(IMGID,IMG_Type,IMG)
values (@ImgID,@ImgType,@MyIMG)
GO
 
Back
Top