Signature Component not working

  1. i have the ms sql column data type set to varbinary(max)
  2. The value is set correctly

Whenever i delete the signature component my form works correctly, However anytime i add the signature component my edit crud page is no longer able to save the info? Any ideas?

You can use your browser console network tab to check what is submitted when the form doesn’t work.

Headers Tab/ General:

  1. Request URL:

http://localhost/odata/Data/PromotionLogs(3)

  1. Request Method:

PATCH

  1. Status Code:

400 Bad Request (from ServiceWorker)

  1. Referrer Policy:

strict-origin-when-cross-origin

Preview Tab:

  1. {error: {code: "", message: "The input was not valid.",…}}

  2. error: {code: "", message: "The input was not valid.",…}

1. code: ""
2. details: [{code: "", message: "The input was not valid."}]

  1. 0: {code: "", message: "The input was not valid."}

3. message: "The input was not valid."

From what I can tell, the Razden code doesn't want to upload the data:image/png;base64 data.

Try to debug the controller method - you will get moreover info about the actual database error

How do i access that?

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 PATCH http://localhost:5000/odata/SqlData/SqlTables(4) application/json 10055
info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4]
CORS policy execution successful.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
Route matched with {action = "PatchSqlTable", controller = "SqlTables"}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult PatchSqlTable(Int32, Microsoft.AspNet.OData.Delta`1[Angularapp.Models.SqlData.SqlTable]) on controller Angularapp.Controllers.SqlData.SqlTablesController (server).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type 'Microsoft.AspNetCore.Mvc.SerializableError'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
Executed action Angularapp.Controllers.SqlData.SqlTablesController.PatchSqlTable (server) in 351.5926ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 482.0263ms 400 application/json; odata.metadata=minimal; odata.streaming=true

The Signature component needs a String property. Probably OData cannot convert that later to varbinary. You can try using a separate string property to store the signature and then convert it to the one used to persist it (check here how to extend the OData controllers). Alternatively change the DB type of your column to varchar(max) and infer the data source again.

Thank you, that allowed it to save the data. (I ended up changing the column type)

2 smaller issues now.

  1. Whenever you go to reopen it, it duplicates the signature side creating a shadow effect
    Top one is example of opening twice, and bottom one is an example of opening once, after first save,
    image
  2. How would I go about showing the signature in an ssrs report?

Okay for my second question what i did to make it work in SSRS is

Select CAST('' AS XML).value('xs:base64Binary(sql:column("[JoinColumnName]"))'
, 'VARBINARY(MAX)') AS SignatureImage
From TableName A
Left Join (Select ID, Right([YourColumnName],Len([YourColumnName]) -22) as JoinColumnName FROM [TableName ]) as A on A.ID = B.ID