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='Hidde n.txt'"
SqlCommand cmd = new SqlCommand();
cmd.CommandText = cmdText;
cmd.Connection = con;
SqlParameter objParam = new SqlParameter("@ content", SqlDbType.Image ,
binFile.Length) ;
objParam.Direct ion = ParameterDirect ion.Input;
objParam.Value = binFile;
cmd.Parameters. Add(objParam);
int i = cmd.ExecuteNonQ uery()
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