So, tell us what is and what isn't working.
I do have a few comments and questions. First, as a matter of memory usage, you create a
New SqlParameter
and then immediately set it to something else at:
Dim InsertResumeProcedure As New SqlParameter
InsertResumeProcedure = cmd.Parameters.Add("@clmReturnDuplicateValue", SqlDbType.Int)
You don't need to have the
New
keyword. That's actually creating a new SqlParameter in memory that never gets used.
Secondly, I'm quite confused by your
DuplicateProcedure
. In your main form, you tell your objConn...whatever that is to open the connection. Then, you call
DuplicateProcedure
. So, you get into
DuplicateProcedure
and then you create a brand new connection. Then, you run your stored procedure and the only thing you do with the result is send it to a MessageBox. Then, you clear the parameters.
After that, you create
InsertResumeProcedure
which you then never use. Then, you get into your Try/Catch block. First, you check to see if the connection is open...which it will never be because you just created it in this method and never opened it. So, there's no reason to check that. Then, you open it, and I guess you think that magically the parameters that you just cleared will still be there. And what happened to naming conventions? "jj" to represent whether or not a value is a duplicate?
And even if the connection somehow did magically open on its own when you checked its connection state, why would you ever set the properties to Nothing? You return AR, and if somehow you got to your section of code where you set the values to Nothing, the in your main form, you then check to see if propFN equals something, which will throw an error because you just set propFN to Nothing.
So, since "jj" should never get beyond being null (because you cleared the parameters and never reloaded them), AR will always be a new object with nothing in it.
You have all kinds of issues in your code. Maybe you need to diagram the steps and the objects that you're using and actually see what's happening to them, or what should happen to them.