I'm trying to use the DataSetToolKit (in an Windows Forms .NET 2.0 project). The form is very basic - it has a DataGridView and a strongly-typed data set called sampleDs.
The Code to fill the dataset is as follows:
Public Class Form1
Private cmdBuilder As CommandBuilder
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim multiAdapter As New MultiTableDataAdapter()
cmdBuilder = New CommandBuilder(DatabaseProvider.SqlServer, _
multiAdapter, _
"Data Source=<blah>;Initial Catalog=<BLAH>,Integrated Security=True" _
)
multiAdapter.Fill(sampleDs.KeyInventory, New ValueWhereConstraint(sampleDs.KeyInventory.KeyIDColumn, 1))
End Sub
End Class
and I'm getting the following exception (I'm probably just missing something) on the LINE IN RED ABOVE:
System.Reflection.AmbiguousMatchException was unhandled
Message="Ambiguous match found."
Source="mscorlib"
StackTrace:
at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
at System.Type.GetProperty(String name)
at Hydrus.DataSetToolkit.MultiTableDataAdapter.a(DataTable b, IDbCommand b, IDbTransaction b, IWhereConstraint[] b)
at Hydrus.DataSetToolkit.MultiTableDataAdapter.a(DataTable b, Boolean b, IDbTransaction b, IWhereConstraint[] b, IList b)
at Hydrus.DataSetToolkit.MultiTableDataAdapter.Fill(DataTable dataTable, Boolean fillParentRows, IDbTransaction tran, IWhereConstraint[] whereConstraints)
at Hydrus.DataSetToolkit.MultiTableDataAdapter.Fill(DataTable dataTable, IWhereConstraint[] whereConstraints)
at TestDataSetToolkit.Form1.Form1_Load(Object sender, EventArgs e) in H:\My Documents\Visual Studio 2005\Projects\TestDataSetToolkit\TestDataSetToolkit\Form1.vb:line 16
...
...
...
etc.