Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 To: Benny Thomas
  Where is Benny Thomas?
 Jeddah
 Saudi Arabia
 Benny Thomas
 Tags
Subject: RE: _Tally system variable
Thread ID: 416140 Message ID: 416144 # Views: 56 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Monday, December 22, 2014 3:45:14 PM         
   


> _Tally system variable is supposed to hold the number of recrods affected by the most recently executed table command, including SELECT SQL
>
> However,
>
> ? SQLEXEC(oConna, 'Select * from glaccount','mycurs') && selects 172 records
> ? _tally && does not show 172
>
> SELECT * FROM mycurs
> ? _tally && shows 172
>
> Why after SQLEXEC _Tally does not work? If it does not work, is there a way to know if the command SELECTed any reocrds?
>
> Thanks.
>
> Benny

Always use RECCOUNT().

? SQLEXEC(oConna, 'Select * from glaccount','mycurs') && selects 172 records
? reccount("MYCURS")

SELECT * FROM mycurs NOFILTER
?reccount("MYCURS")


Mike Yearwood
Microsoft MVP Visual FoxPro 2008, 2009
We have enough youth. We need a fountain of smart!
There may be many ways to skin a cat, but there are very few right ways to do it.

ENTIRE THREAD

_Tally system variable Posted by Benny Thomas @ 12/22/2014 3:31:19 PM
RE: _Tally system variable Posted by Mike Yearwood @ 12/22/2014 3:45:14 PM
RE: _Tally system variable Posted by Borislav Borissov @ 12/22/2014 3:58:26 PM
RE: _Tally system variable Posted by Benny Thomas @ 12/22/2014 9:24:49 PM