General information
Title:
DeleteCmd in Cursor Adapter
Hi,
I tried to understand the behavior of DeleteCmd. I have created a form using Native as data source by following the Walkthrough: Retrieving Data from Different Data Sources except I checked the automatic updating column for the CUSTOMERID field and changed the Customers table's Rules for Deleting to Cascade from Restrict. I tried the following scenarios:
1. Click the delete mark column of a row in the grid and then move the cursor to next row in the grid.
The Customer record corresponding to the deleted row in the grid is deleted along with records in child tables.
2. Store "wait window 'delete' nowait" to the DeleteCmd property. Click the delete mark column of a row in the grid and then move the cursor to next row in the grid.
No records are deleted. The wait window is displayed.
3. Store "delete in Customer" to the DeleteCmd property. Click the delete mark column of a row in the grid and then move the cursor to next row in the grid.
No records are deleted.
4. Store "delete from Customer where customerid = 'ANTON'" to the DeleteCmd property. Click the delete mark column of a row in the grid and then move the cursor to next row in the grid.
Get the error message "Illegal recursion in rule evaluation."
5. Store "wait window 'delete' nowait" to the DeleteCmd property. Add a new button to the form with "delete in Customer" in the click(). Clicked the new button.
The last record in the Customer table is deleted along with records in child tables. No wait window is displayed.
I hope someone can explain the behavior of scenario 2 to 5 since they are kind of contracdicting.
Thank you,
Peter
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only