Hi,
I am trying to get a basic photo uploader working to see how it works. I'm using the tutorial :
http://www.codeproject.com/KB/aspnet/simpleuploadimage.aspx
I am having troubles with adding the image to the database using the stored proceedure, so I want to change the code on the site to add:
//Execute the procedure with Microsoft.ApplicationBlock
s.Data
DBConnect.OpenConnection()
;
SqlCommand commandaddEvent = new SqlCommand("exec usp_AddPhoto @Photo", DBConnect.conn);
commandaddEvent.Parameters
.Add("Phot
o", SqlDbType.UniqueIdentifier
);
commandaddEvent.Parameters
["Photo"].
Value = photo;
commandaddEvent.ExecuteNon
Query();
DBConnect.CloseConnection(
);
//Simple procedure
/*CREATE PROCEDURE sp_img(@img image) AS
insert into tb_img values(@img)*/
//record data
SqlHelper.ExecuteNonQuery(
connection
String,"sp
_img",obj)
;
What variable or reference is the image for me to reference to photo in the following line?: commandaddEvent.Parameters
["Photo"].
Value = photo;
Thanks