Problem using the Windows DataGrid

  • Thread starter Thread starter Bob Rosen
  • Start date Start date
B

Bob Rosen

The statement in question is:

grid.SetDataBinding(DataSource:=orderData, DataMember:="Orders")

and the data source for orderData is from the Access XP Northwind database
where the SQL statement is:

Select OrderID,CustomerID,ShippedDate from Orders where (CustomerID='ANTON')
order by OrderID

From trying out the SQL statement in an Access query window I know at least
that the SQL statement is valid and returns data. However, executing the
SetDataBinding statement
generates the following message:

Can't create a child list for field 'Orders'

What might that mean (besides that it indicates that, as usual, Microsoft
product error messages
suck)?

Bob Rosen
 
Bob,

Is the orderData variable a DataSet or a DataTable? If the latter is the
case, you don't have to specify DataMember - or pass an empty string as the
data member. If orderData is a data set, ensure that the TableName property
for the contained DataTable is indeed "Orders".
 
Back
Top