Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reccount() and recno()
Message
 
To
23/10/2004 12:32:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
00954002
Message ID:
00954004
Views:
19
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform