Hi guys
This is just driving me mad. :-| Here´s the thing:
When a dataset has been created like this:
Dim customerOrders As DataSet = New DataSet("Custom erOrders")
Dim ordersTable As DataTable = customerOrders. Tables.Add("Ord ers")
Dim pkOrderID As DataColumn = ordersTable.Col umns.Add("Order ID",
Type.GetType("S ystem.Int32"))
ordersTable.Col umns.Add("Order Quantity", Type.GetType("S ystem.Int32"))
ordersTable.Col umns.Add("Compa nyName",
Type.GetType("S ystem.String"))
... then this is possible:
Dim test = customerOrders. Tables("Orders" ).AsEnumerable( )
... but when a dataset has been created by adding a new item to the
project resulting in a .xsd file, then it seems to be a completely
different type of dataset, which doesn´t have all the methods that the
dataset created though code does [ie. Tables()].
Is this basicly just two different kind of datasets (a good one and a
completely useless one)?
Regards Søren
This is just driving me mad. :-| Here´s the thing:
When a dataset has been created like this:
Dim customerOrders As DataSet = New DataSet("Custom erOrders")
Dim ordersTable As DataTable = customerOrders. Tables.Add("Ord ers")
Dim pkOrderID As DataColumn = ordersTable.Col umns.Add("Order ID",
Type.GetType("S ystem.Int32"))
ordersTable.Col umns.Add("Order Quantity", Type.GetType("S ystem.Int32"))
ordersTable.Col umns.Add("Compa nyName",
Type.GetType("S ystem.String"))
... then this is possible:
Dim test = customerOrders. Tables("Orders" ).AsEnumerable( )
... but when a dataset has been created by adding a new item to the
project resulting in a .xsd file, then it seems to be a completely
different type of dataset, which doesn´t have all the methods that the
dataset created though code does [ie. Tables()].
Is this basicly just two different kind of datasets (a good one and a
completely useless one)?
Regards Søren
Comment