Thanks for reading this. We are converting a large VB6 application to VB.net. The problem we have all over the code is the .NET converter did not "reorder" the "IF" and other statements in the code to stop execution when a DBNull value exists.
For example, we have code like this all over the place.
"If rRow.Item("av_election_id") > 0 And (rRow.Item("Challenged") <> "SUSPD" Or IsDBNull(rRow.Item("Challenged"))) Then"
This causes a error when "rRow.Item("Challenged") is dbnull
The line of code below corrects this issue but we have thousands of lines of code to reorder and refactor.
dtAVVoterRow.Rows(0)("av_election_id") > 0
My question is does anyone have any idea of creating a wrapper class or something to allow us to keep the first example of code above where it will not throw an error when encountering a Null value? I don't know if a wrapper that reordered the If statements,
or captures the error but continues the execution somehow?
I appreciate any help.
View Complete Post