locked
Will I get errors RRS feed

  • Question

  • User1864322503 posted

    Hello,

    I am having to restructure some of my web forms, sometimes removing fields from the form entirely. My question: if I remove something from the form, and do not remove it from my code behind parameters, will this cause a database error? Or will it just ignore it if nothing is entered, assuming that Nulls are allowed in my OracleDB?

    Wednesday, July 24, 2013 11:34 AM

Answers

  • User269602965 posted

    Lets say you SELECT COL1, COL2, COL3 FROM TABLEX but only use COL1 and COL3 in datagrid, that will not create error.

    However if you use textbox1 as BIND variable in PARAMETER collection such as

    SELECT COL1, COL2, COL3 FROM TABLEX WHERE ADDRESS = :bindvarStrAddress

    then the SQL will likely give unexpected results are you are effectively removing the filter variable in place for some purpose in the old web forms or other errors because the value being passed to the bindvar is not initialized.

    Same would apply to UPDATES, INSERTS, DELETES statements dependent on bind variables from parameter collection.

    I would say, good practice to adjust your behind page coding to match page coding as you adjust web forms and reports.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2013 6:48 PM