I'm trying to update an image field where the id is equal to the row selected.
I've tried using the below code
String query = "UPDATE ArticlesTBL SET ArticleImg = VALUE (@ArticleImg) WHERE ArticleID = VALUE (@id)";
SqlCommand myCommand = new SqlCommand(query, myConnection);
myCommand.Parameters.AddWithValue("@ArticleImg", "UploadedUserFiles/" + FileUpdate.FileName);
myCommand.Parameters.Add(new SqlParameter("@id", ThisID));
myinfo.Text = query;
But I don't know where to place commas, brackets etc in the query string. I have a text box outputting my command and it shows that i'm using UPDATE ArticlesTBL SET ArticleImg = @ArticleImg WHERE ArticleID = @id But I'm not actually accessing the parameters. So, how do I access these parameters? Thanks
@idparameter in yourTextBox? You don't need to useVALUEby the way.ArticleIDandArticleImgcolumns?