Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Important
Message
De
27/08/2001 17:31:22
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00549630
Message ID:
00549640
Vues:
13
>I have created a procedure in which I created a View that selects only one field(Batch_num) from table Claims say lv_Batch_nums. To go through each record of lv_Batch_nums i used a for loop like
> use lv_Batch_nums
> if reccount() > 0
> for cnt = 1 to reccount() step 1
> goto cnt
>* Here I created another view and worked with other tables.
>endfor
>endif
>
> I found that the for loop keeps me on the same record in lv_Batch_nums. It keeps me on the very first record thoughout the loop. If I remove the view or other tables i am working within the loop, then it works fine.
>Any help
>
>Thanks
>Bharat

Bharat --

I think the problem you're running into is the choice of work area. Your view lv_Batch_nums is selected after you open it with a USE. But, it's not selected when you return from the "cnt" routine. To fix your existing code, do a SELECT lv_Batch_nums prior to either this code. Mark recommended using the SCAN/ENDSCAN construct, which automatically reselects the work area.

BTW, I think you'll find more response if you use a more descriptive header for your message. I think everyone who posts a question here considers it "important". Some folks simply refuse to read messages without a descriptive header. Something might "Record pointer won't move" simply describes your situation.

Jay
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform