Problem using the Windows DataGrid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Rosen

    Problem using the Windows DataGrid

    The statement in question is:

    grid.SetDataBin ding(DataSource :=orderData, DataMember:="Or ders")

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

    Select OrderID,Custome rID,ShippedDate from Orders where (CustomerID='AN TON')
    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



  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: Problem using the Windows DataGrid

    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".

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Bob Rosen" <bobrosen@zipco n.net> wrote in message
    news:1065560618 .747837@news.zi pcon.net...[color=blue]
    > The statement in question is:
    >
    > grid.SetDataBin ding(DataSource :=orderData, DataMember:="Or ders")
    >
    > and the data source for orderData is from the Access XP Northwind database
    > where the SQL statement is:
    >
    > Select OrderID,Custome rID,ShippedDate from Orders where[/color]
    (CustomerID='AN TON')[color=blue]
    > order by OrderID
    >
    > From trying out the SQL statement in an Access query window I know at[/color]
    least[color=blue]
    > 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
    >
    >
    >[/color]

    Comment

    Working...