Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_TALLY returns 1 instead of 0
Message
 
To
14/04/2003 02:28:39
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00777086
Message ID:
00777096
Views:
11
Hi Michel,

IIRC, RECCOUNT() looks at the header of the cursor, so your code could read:
* Syntax differs from VFP to SQLExec()
IF This.lClientServer
   This.nCount = RECCOUNT()
ELSE
   This.nCount=_TALLY
ENDIF
note that this assumes (as your code below does) that the cursor you're interested in is open in the current work area.

Cheers,

Andrew

>>Hi Michel,
>>
reccount(< YourNewCursorName >)
>>should do it.
>
>Yes, I ended up doing this:
>
>
>* Syntax differs from VFP to SQLExec()
>IF This.lClientServer
>   COUNT TO This.nCount
>   ELSE
>   This.nCount=_TALLY
>ENDIF
>
>
>Basically, I'd like to have the best optimized way. _TALLY is good for native VFP table as we are just accessing a reference. But, doing a COUNT as I do for a SQLExec() cursor is a little bit more process. Is RECCOUNT() using the _TALLY approach or the COUNT approach?


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform