Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update SQL - surprise
Message
 
À
12/07/1998 18:36:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00116570
Message ID:
00116685
Vues:
17
Hi David,

I tried to reproduce this one but it works in my case. Does it work correctly from the command window? Maybe the record pointer is getting changed somewhere in the form...


>>>I got a slight surprise to see the record pointer being moved while using the SQL Update command.
>>>I would have thought, that like other SQL commands, noteably SQL Select, that the record pointer wouldn't be moved.
>>>I wouldn't say this was a "bug" but it would be nice to see the pointer restored automatically after the operation.
>>
>>Are you referring to a table open in the current select area whose pointer gets moved if a SQL is executed against other tables? I would be interested in such details.
>>
>>Thanks.
>
>It was a simple
>UPDATE Ops ;
>   SET Extno = SPACE(4), ;
>   LoggedOn = .F. ;
>   WHERE Extno = app.extno
>I don't really care if it's the currently selected table or not. This moves the record pointer for "Ops" to EOF(). My view is that it should not move at all. Otherwise I'd simply use the old SCAN technique
>
* save recno() here
>SCAN FOR Extno = app.extno
>   REPLACE Extno WITH SPACE(4), LoggedOn WITH .F.
>ENDSCAN
>*go to old recno here
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform