kermitforney
Technical User
Let me preface this post by explaining that I am VERY new to .Net and usually have my head stuck up SQL Server Management Studio.
I am trying to modify a combobox so that it displays the values returned from a stored procedure. Seems pretty simple, but when Debugging, the only values that are displayed are the "System.Data.DataRowView" for every value returned.
Somehow I am not assigning the value correctly, just not sure how.
I am trying to modify a combobox so that it displays the values returned from a stored procedure. Seems pretty simple, but when Debugging, the only values that are displayed are the "System.Data.DataRowView" for every value returned.
Somehow I am not assigning the value correctly, just not sure how.
Code:
cmd.CommandText = "stpRecruiters"
cmd.Parameters.Clear()
dtr = cmd.ExecuteReader()
dtb.Clear()
dtb.Columns.Add(New DataColumn("strAssignedRecruiter", GetType(String)))
While dtr.Read
drw = dtb.NewRow
drw("strAssignedRecruiter") = dtr("strAssignedRecruiter")
dtb.Rows.Add(drw)
End While
cboRecruiter.DataSource = dtb
cboRecruiter.DataBind()
dtr.Close()