Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00097004
Message ID:
00097015
Views:
27
>Hello All;
>I'm having a problem with my table sizes. I'm dealing with tables that are up to or more than 1 gig. At one point I need to decide if I can order to the table i.e "SELECT * for mytable order by my keyfield into table new table"
>
>Since the table is a cursor, I cannot use FSIZE() to determine it's size, so I have a FOR loop that determines that size of 1 record and then I multipy it by reccount() * 3. This value I compare with DISKSPACE(SYS(5)). If DISKSPACE is greater, then I run my SQL.
>
>The problem occurs if the cursor size is too big. I need this data to sit in a table with a different name. If I close the cursor, the data is gone!! I can't SQL it into a new table.
>
>Any ides are welcome!!
>
>Sandy

You can calculate the size the cursor would be as a table using the following:
lnsize = HEADER() + ((RECSIZE() + 1) * _TALLY)
By using _TALLY, rather than RECCOUNT(), you'll get the number of records that they query returned. In some cases, this will not be equal to RECCOUNT()

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform