KB Issue
If the sqlcommand name is not the same for the parameters, you will receive the following error: 'object reference not set to an instance of an object'.
Issue Details
If the sqlcommand name is not the same for the parameters you will receive the following error.
Object Reference
object reference not set to an instance of an object
Recreate Issue
The following command will cause this issue.
[ASP.NET - sqlcommand not set]
CFFCS | CarrzSynEdit: | ASP.NET (VB/C#)
Dim chTable As New SqlCommand("SELECT top 1 ISID from Table", con)
chOneTable.Parameters.Add(New SqlParameter("@ID", theID))

As you can see above, the chOneTable from the bottom is not the same as the top, chTable.
Resolve Issue
To correct this issue we need to make sure our SQL Command is the same.
[ASP.NET - sqlcommand is set]
CFFCS | CarrzSynEdit: | ASP.NET (VB/C#)
Dim chTable As New Sqensure"SELECT top 1 ISID from Table", con)
chTable.Parameters.Add(New SqlParameter("@ID", theID))