i want to know this for grid view using ASP.NET

Posted by Subhadip under ASP.NET on 2/3/2011 | Points: 10 | Views : 1064 | Status : [Member] | Replies : 2
HOW TO INSERT IMAGE INTO DATA BASE USING STORE PROCEDURE




Responses

Posted by: Karthikanbarasan on: 2/3/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Your question is more generic... there are many ways to do it... if you want the stored procedure alone.. then go for the below... if you need any more pls put your requirement in depth

CREATE PROC InsertNewImage

@Caption varchar(50),
@Content varbinary(max)
AS
INSERT INTO [DummyDatabase].[dbo].[Image] ([Caption], [Content])
VALUES (@Caption, @Content)


Thanks
Karthik
www.f5Debug.net

Subhadip, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 2/3/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Subhadip,

Read this article http://www.dotnetfunda.com/articles/article1084-saving-images-into-the-database-in-aspnet-and-displaying-to-the-gridview-.aspx where I have used SQL statement to insert the image into the database. You can copy-paste that into a stored procedure and call that stored procedure, rest all are same.

How to call stored procedure can be read from http://www.dotnetfunda.com/articles/article375-insert-data-using-parameters-through-stored-procedure-.aspx.

Thanks!

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Subhadip, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response