Hi,
I have to update my table using SqlParameter. Below is my code for
update.
cmdText = "update docs set Content = @content where DirName='" +
DirName.Replace("'","''") + "' and LeafName='Hidden.txt'"
SqlCommand cmd = new SqlCommand();
cmd.CommandText = cmdText;
cmd.Connection = con;
SqlParameter objParam = new SqlParameter("@content", SqlDbType.Image,
binFile.Length);
objParam.Direction = ParameterDirection.Input;
objParam.Value = binFile;
cmd.Parameters.Add(objParam);
int i = cmd.ExecuteNonQuery()
when i execute this code it's returing i valu -1.(No records affected).
What is the problem in my code. If anbody knows please let me know to
solve it.
Thanks,
Vinoth
vi****@gsdindia.com