66chawger
asked on
VB.NET Cannot Bind This Event : Column does not belong to table
I am receiving a VB.NET run time error as stated in the title. I changed a text field to a drop-down as follows in bold, specifically the line next to the arrows.
Dim LI As ListItem
If DR("Employee_Cd").ToString .Length > 0 Then
-->>>>>> LI = New ListItem(DR("Employee_Nm") , DR("Employee_Cd"))
If Not Me.ddlEmployeeName.Items.C ontains(LI ) Then
Me.ddlEmployeeName.Items.A dd(LI)
End If
End If
ddlEmployeeName.SelectedVa lue = DR("Employee_Cd")
"This code follows the above and is working correctly"
If DR("Supervisor_Cd").ToStri ng.Length > 0 Then
LI = New ListItem(DR("Supervisor_Nm "), DR("Supervisor_Cd"))
If Not Me.ddlSupervisor.Items.Con tains(LI) Then
Me.ddlSupervisor.Items.Add (LI)
End If
End If
ddlSupervisor.SelectedValu e = DR("Supervisor_Cd")
Dim LI As ListItem
If DR("Employee_Cd").ToString
-->>>>>> LI = New ListItem(DR("Employee_Nm")
If Not Me.ddlEmployeeName.Items.C
Me.ddlEmployeeName.Items.A
End If
End If
ddlEmployeeName.SelectedVa
"This code follows the above and is working correctly"
If DR("Supervisor_Cd").ToStri
LI = New ListItem(DR("Supervisor_Nm
If Not Me.ddlSupervisor.Items.Con
Me.ddlSupervisor.Items.Add
End If
End If
ddlSupervisor.SelectedValu
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ron,
I am just overthinking.... you are correct! The data event that is saved is returned in a separate query result via a different stored procedure. I just needed to take the blinders off. Thanks!
I am just overthinking.... you are correct! The data event that is saved is returned in a separate query result via a different stored procedure. I just needed to take the blinders off. Thanks!
ASKER
Expert stated the obvious... which in this case is what I needed to be looking at. Never afraid to ask a question and always glad when someone replies in kind.
ASKER