I have an issue with inline editing.

I have an issue with inline editing.

mikducmikduc Posts: 31Questions: 8Answers: 0

I have a single character database field for accepting alpha and special character data [possible values: 'M', 'm', 'R', '<'] from my datatables grid. Everything works fine except when inputting the special character '<'. Other special characters work ok.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Perhaps you could link to a page showing the issue, or perhaps saying what it is that is going wrong when you enter <?

    Allan

  • mikducmikduc Posts: 31Questions: 8Answers: 0

    Allan,

    I do not have an outside link to the page giving me issues. I have included the error code from the response in debug. Hope this is sufficient.

    <br />
    <b>Warning</b>: db2_execute(): Statement Execute Failed in <b>/www/zendphp7/htdocs/DataTables_Editor/php/Database/Driver/Db2/Query.php</b> on line <b>137</b><br />
    {"fieldErrors":[],"error":"DB2 SQL error = 22001","data":[],"ipOpts":[],"cancelled":[],"debugSql":[]}

    Thanks,
    Mike

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    DB2 SQL error = 22001 means this:

    THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE

    What is the data type of the field in question?

  • mikducmikduc Posts: 31Questions: 8Answers: 0

    The declaration for the field in question is:

    QSPECR CHAR(1) CCSID 37 NOT NULL DEFAULT ''

    The interesting thing is that I can manually update the field with the value "<" causing the error through in-line editing - no problems.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Answer ✓

    Hi Mike,

    I wonder if the Xss protection is kicking in (it shouldn't be in PHP, but let's check). Add ->xss(false) to the Field instance where this is an issue.

    Thanks,
    Allan

  • mikducmikduc Posts: 31Questions: 8Answers: 0

    Alan,

    Perfect, that solved the problem.

    Thanks for you help.
    Mike

This discussion has been closed.