Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reccount problem on GRID
Message
From
26/03/2012 10:27:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/03/2012 08:50:27
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01539334
Message ID:
01539369
Views:
67
OK. In any case, if you do a SELECT - SQL command (select ... into cursor ... nofilter), you can use reccount(). Even without the NOFILTER, the variable _tally will tell you how many records were selected. (Copy it to a variable immediately, because many commands will affect the variable _tally.)

By the way, it is recommended to use the HTML code PRE for program code - that way, spaces will be maintained, and automatic word wrap is turned off. I am formatting your code as an example; click on "REPLY" to see how the codes look:

>Hello Hilmar
>
>Thanks for your reply because that help me to understand better how work the RECCOUNT(), also i solve my problem writing my code and declare a variable "lncontador" to keep the value of the numbers of rows in my grid (Cursor) , like this:
>
Select ox
if ox.olorigem = 'CX90'

    select oy
    lncontador = 0
    scan
        lncontador = lncontador + 1
    endscan
    if lncontador > 1
        msg("Não pode ter mais que uma linha," + CHR(13) + ;
            "pois trata-se de uma Letra")
        return .F.
    endif
endif
select ox
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform