I need a solution to modify the data in the row

Posted by Bees7000 under ASP.NET on 12/11/2011 | Points: 10 | Views : 898 | Status : [Member] | Replies : 1
I need a solution to modify the data in the row consists of the name and image but sometimes I need to modify the name only with the survival of the same image

sql table
ID | Name | Image
//Insert Item SP
CREATE proc [dbo].[SP_AddNewItem]
@Name nvarchar(50),
@photo image
as
insert into regions(name,photo)
values
(@Name,@photo)
return @@identity

********************************************************

//Update Item SP
CREATE proc [dbo].[SP_UpdateItem]
@Id int,
@Name nvarchar(50),
@photo image,
as
update regions
set
Name=@Name,
photo=@photo,
where
ID=@id


and i'm using asp controls to insert date like

textBox and FileUpload to insert an image

and when retrive date it retrived in gridview

and when click update button and update name in textbox and save data i'm going to database and i don' find the image in updated row
What is the solution?
Thank you very much

Marwan


Responses

Posted by: Sksamantaray on: 12/11/2011 [Member] Silver | Points: 25

Up
0
Down
can you attach your code

Thanks,
Sanjay

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

Login to post response