Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
V6s5 - REQUERY() a view for a given SELECT no. of recs
Message
De
21/04/2004 08:48:06
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00895276
Message ID:
00896833
Vues:
26
There is a cursor created by a view. The SELECT in BuildTree() reads from that cursor? You are deleting a record in that cursor and doing tableupdate. Then you run BuildTree() again?

Like this?
SELECT ;
    Cmp_Name ;
  FROM ;
    Companies ;
  WHERE ;
    UPPER(cmp_name) = "A" ;
  INTO CURSOR step1 ;
  NOFILTER READWRITE
?RECCOUNT()

DELETE FOR MOD(RECNO(),10)=0

*Simulate SQL in BuildTree()
lcSetDeleted = SET("DELETED")
SET DELETED ON
SELECT Cmp_Name FROM STEP1 INTO CURSOR STEP2
SET DELETED &lcSetDeleted.
?RECCOUNT()
If SET DELETED is OFF, the number of records in Step2 is the same as Step1. If SET DELETED is ON the number of records will be less in Step2. It is better to use SET DELETED before the SQL than to use NOT DELETED() in the SQL.


>Hi Mike
>
>>Add the NOFILTER keyword to the end of the SQL command.
>
>Though this keyword I could not find in the help for SELECT - SQL I was worried that it would raise an error. Sorry no change. I put in a browse on the remote view in this buildtree() method that houses the SELECT statement and yet the deleted record shows in the browse window.
>
>My framework CodeBook has Transactions, will that affect results?

No. None of this should be happening during a transaction.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform