Please, guys, help...
At now time i'm adding stored procedure to Personal.mdf
ALTER PROCEDURE UpdatePhoto
@AlbumID int,
@Caption nvarchar(50),
@BytesOriginal image,
@BytesFull image,
@BytesPoster image,
@BytesThumb image,
@PhotoID int
AS
UPDATE [Photos]
SET [AlbumID] = @AlbumID,
[BytesOriginal] = @BytesOriginal,
[Caption] = @Caption,
[BytesFull] = @BytesFull,
[BytesPoster] = @BytesPoster,
[BytesThumb] = @ByteThumb
WHERE [PictureID] = @PhotoID
RETURN
also, i want adding button to gridview

then, add code to PhotoManager.vb
Public Shared Sub UpdatePhoto(ByVal PhotoID As Integer, ByVal AlbumID As Integer, ByVal Caption As String, ByVal BytesOriginal() As Byte)
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("LocalSqlServer").ConnectionString)
Using command As New SqlCommand("UpdatePhoto", connection)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(New SqlParameter("@PhotoID", PhotoID))
command.Parameters.Add(New SqlParameter("@AlbumID", AlbumID))
command.Parameters.Add(New SqlParameter("@Caption", Caption))
command.Parameters.Add(New SqlParameter("@BytesOriginal", BytesOriginal))
command.Parameters.Add(New SqlParameter("@BytesFull", ResizeImageFile(BytesOriginal, 600)))
command.Parameters.Add(New SqlParameter("@BytesPoster", ResizeImageFile(BytesOriginal, 198)))
command.Parameters.Add(New SqlParameter("@BytesThumb", ResizeImageFile(BytesOriginal, 100)))
connection.Open()
command.ExecuteNonQuery()
End Using
End Using
End Sub
and, at now time i want bind my buttons to this code, but i don't know how i can send parameters, how i can known PhotoID which i want to update by pressing button on GridView?
how i can do it? ***, i only want replace photo in db.