if (File.Exists(savePath)) File.Delete(savePath); fleUpload.SaveAs(savePath); SqlConnection con = new SqlConnection(getConnectionString("dbConn").ToString()); SqlCommand sqlCmd = new SqlCommand("update [dbo].[table] set fieldX = @imgPath where code = @Code and [A#] = @clientNum", con); sqlCmd.Parameters.Add("@imgPath", SqlDbType.VarChar).Value = imagePath; sqlCmd.Parameters.Add("@clientNum", SqlDbType.VarChar).Value = oARegNum; sqlCmd.Parameters.Add("@providerCode", SqlDbType.VarChar).Value = providerCode; con.Open(); sqlCmd.ExecuteNonQuery(); con.Close();
savePath
imagePath
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)