I have a form which uploads an image. It works correctly.
Now I want to add a button to delete the image manually.
My approach:
The problem I have is with the
I just want to set it to null, but which type it should be? I get an SQL Error:
The query executed:
I just want to create a query like:
Using SmartGWT 4.0 Power.
Thanks
Now I want to add a button to delete the image manually.
My approach:
Code:
Record updateRec = new Record();
updateRec.setAttribute("f_id", Id);
updateRec.setAttribute("f_foto", (Byte[])null);
updateRec.setAttribute("f_foto_date_created", (Date)null);
updateRec.setAttribute("f_foto_filename", (String)null);
updateRec.setAttribute("f_foto_filesize", (Integer)null);
DataSource.get("fotos").updateData(updateRec);Code:
updateRec.setAttribute("f_foto", (Byte[])null);Code:
"Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query."Code:
UPDATE t_schueler SET f_foto=?, f_foto_date_created=NULL, f_foto_filename=NULL, f_foto_filesize=NULL WHERE (t_schueler.f_id=8985)Code:
UPDATE t_schueler SET f_foto=NULL, f_foto_date_created=NULL, f_foto_filename=NULL, f_foto_filesize=NULL WHERE (t_schueler.f_id=8985)Thanks