Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange SQL behaviour Select versus Locate
Message
De
01/08/2013 02:25:35
 
 
À
01/08/2013 02:18:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01579633
Message ID:
01579634
Vues:
90
This message has been marked as the solution to the initial question of the thread.
>I am debugging old application and can't understand the existing behaviour.
>A form with private datasession and at some stage in debugger
>I can see in watch window - record is not deleted ( deleted() .F. ) , seq = 1234 ( primary key ) , set deleted on , mytable is current alias
>However
>
>select count(*) from mytable where seq=1234 into array lacount 
>
>results in lacount[1] = 0
>
>select count(*) from mytable where seq=1234 
>
>Empty query
>
>But
>
>Locate for seq=1234 
>
>results in found() - .T.
>We may suspect that something wrong with the index ( primary key ) , but once form is closed , sql works fine. Is it something to do with buffering and flushing which I am not aware of ?

Can it be that you are using table buffering and that that record hasn't gone through a TableUpdate() yet?

Try to use the buffering clause in the select
select count(*) from mytable with buffering= .t.  where seq=1234 
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform