troubleshooting Question

c#, help with basic photo uploader

Avatar of CharlieDev
CharlieDevFlag for United Kingdom of Great Britain and Northern Ireland asked on
2 Comments1 Solution236 ViewsLast Modified:
I am trying to get a basic photo uploader working to see how it works. I'm using the tutorial :

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.ApplicationBlocks.Data

            SqlCommand commandaddEvent = new SqlCommand("exec usp_AddPhoto @Photo", DBConnect.conn);

            commandaddEvent.Parameters.Add("Photo", SqlDbType.UniqueIdentifier);
            commandaddEvent.Parameters["Photo"].Value = photo;


            //Simple procedure

            /*CREATE PROCEDURE sp_img(@img image)  AS

            insert into tb_img values(@img)*/

            //record data


What variable or reference is the image for me to reference to photo in the following line?:   commandaddEvent.Parameters["Photo"].Value = photo;

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros