I am getting an inexplicable error message on attempting to run a simple WPF data binding application based on an example with video downloaded from MSDN.
VB / VS 2008 Pro / .NET 3.5 SP1 / XP SP3
The error (ex.Message) is "The specified registry key does not exist" in response to an attempt to define the data context to populate a listbox, but no explicit registry operation is involved at all.
The code is:
Private taTable1 As New D1DataSetTableAdapters.Table1TableAdapter
Private D1Data As New D1DataSet
. . .
Me.DataContext = Me.D1Data.Table1 ' this statement generates the exception
Catch ex As Exception
The error message is giving no obvious clue. What is going on?
The MSDN sample application uses the following code to sort the listbox items:
Me.DataContext = From p In Me.dsProduct.Product Order By p.Name
This construct does not work when I try to use it - VS 2008 reports that "'Name' is not a member of 'System.Data.DataRow'". How may this error be avoided?
View Complete Post