Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DeleteCmd in Cursor Adapter
Message
 
 
À
28/05/2003 18:29:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00793741
Message ID:
00793895
Vues:
79
I may be wrong, but my interpretation regarding the use of CAs is that all data functions are performed using SQL INSERT, UPDATE, DELETE and SELECT commands. I would never expect commands like DELETE IN CUSTOMER to work for the DeleteCmd property.

As for your observation in #4, I gleaned this from the VFP Help file:

A rule or trigger code caused the original cursor, the cursor from which the rule or trigger was fired, to try to evaluate a rule or trigger recursively. This can occur under the following conditions:

Attempting to move the record pointer or change values in the original cursor.

Attempting to move the record pointer in the BeforeUpdate event for a CursorAdapter object.

Check your rule or trigger code.


>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
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform