Here's teh code I *thought* would work:
Dim x As DA_CounselorEmails = New DA_CounselorEmails
With x
.DatabaseInstanceName = \"ICEMAN2\"
.LoadAll()
End With
With cmbCounselorList
.DataSource = x.DefaultView
.DisplayMember = x.CounselorName
End With
However - all i get when I run this is a combobox that contains System.Data.DataRowView as it's content (one item per item in the datatable - so it appears to be iterating through, but it's not putting the content of those CounselorName fields anywhere).
Furthermore - I tried the following code
With x
.Query.AddResultColumn(.CounselorName)
.Query.AddOrderBy(.CounselorName, NCI.EasyObjects.WhereParameter.Dir.ASC)
.Query.Load()
End With
With cmbCounselorList
.DataSource = x.DefaultView
.DisplayMember = x.CounselorName
End With
And I get an error every time that says
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object.
followed by a Msgbox that says \"There is no source code for the location\"..
So I can't really see where this thing is crashing on me.
Any advice/help?
Marko
