Last post Jul 24, 2013 06:48 PM by Lannie
Jul 24, 2013 11:34 AM|nvielbig|LINK
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?
Jul 24, 2013 06:48 PM|Lannie|LINK
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.