..Row cannot be cast to ..Row when appear to be same. InvalidCastException

rowTS = CType(TimeSheetBindingSource.Current, DataRowView.Row, dsMyCo.TimeSheetRow

A first chance exception of type ‘System.InvalidCastException’ occurred in MyCompany.exe

[A]TimeSheetRow cannot be cast to [B]TimeSheetRow. Type A originates from ‘ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location ‘Project…\bin\Debug\ProjectName.exe’. Type B originates from ‘ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location Project…\bin\Debug\ProjectName.exe’.

Check you are converting from Rows in the same dataset. So if a table appears in more than one dataset check you are using the correct one.

Advertisements

form.designer.vb InitializeComponent bug deleting remaining controls

At top of frm.designer.vb there is following code.
If get really stuck then rem out System.Diagnostics…. and put a breakpoint here
You may want a try catch block around code that opens the form