Board index » delphi » BOF/EOF error with ADO and nested data

BOF/EOF error with ADO and nested data

This occurs in Delphi 5 Enterprise even with ADOExpress Update Pack 2.

To duplicate:
1. Create a new project and add an ADOConnection with MSDataShape as
the Provider and Microsoft.Jet.OLEDB.4.0 as the Data Provider. Set the
Data Source to the path for the Access demo DB (C:\Program
Files\Common Files\Borland Shared\Data\dbdemos.mdb).
2. Add an ADODataSet, set the Connection property to the above
connection, then set the CommandText to the following:
SHAPE {
  select * from customer

Quote
}

APPEND (
  (
    SHAPE {
      select * from orders
    } as Orders
    APPEND (
      {
        select * from items
      } as Items
      RELATE OrderNo to OrderNo
    )
  ) RELATE CustNo to CustNo
)
3. Create the persistent fields, then drop a second ADODataSet and set
the DataSetField to the persistent DataSetField from the first
ADODataSet (ADODataSet1Orders).
4. Create the persistent fields for the second ADODataSet, then drop a
third ADODataSet and set the DataSetField to the persistent
DataSetField from the second ADODataSet (ADODataSet2Items).
5. Link DataSources and DBGrids to each ADODataSet.
6. Open the ADOConnection if it isn't already and run.
7. Scroll down to Sight Diver. The first order should have only one
item. Delete it. Now scroll off Sight Diver and back.
"Either BOF or EOF is true, or the current record has been deleted.
Requested operation requires a current record."

Can anyone else duplicate this? Is there a fix?

Thanks,
Adam

 

Re:BOF/EOF error with ADO and nested data


Quote
> 7. Scroll down to Sight Diver. The first order should have only one
> item. Delete it. Now scroll off Sight Diver and back.

Clarification: Delete the item from the order, leaving the order with no items.

Thanks,
Adam

Other Threads