Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reccount() and recno()
Message
 
À
23/10/2004 12:32:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
MS SQL Server
Divers
Thread ID:
00954002
Message ID:
00954004
Vues:
20
>Hi all
>
>I've a VFP8 app talking to MSSQL. Is it save to use RECNO() to reposition my record in a remote view cursor after a SEEK as follows? :
>
>LOCAL lnrecno
>SELECT remote_view
>lnrecno = RECNO()
>SEEK .....
>GO lnrecno

There's a big difference in SQL Server and VFP in the way that records are handled. VFP uses the record pointer to determine the record number. SQL Server is set based and uses the primary key. It's better to use the PK in these kind of situations.

>In addition, I have also noticed that RECCOUNT() doesn't show the number of records in a view correctly.

Again, this is a difference between VFP and SQL Server. If the data is being retrieved asynchronously, then both RECCOUNT() and _TALLY won't be accurate until the data transfer is complete.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform