Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel export
Message
 
To
09/09/2011 05:32:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01523064
Message ID:
01523075
Views:
93
This message has been marked as the solution to the initial question of the thread.
>>>>>I have a table with 1166 records. When I export it to MS Excel, it results 1140 records.
>>>>>What can cause the reduced record number?
>>>>
>>>>How you export data?
>>>
>>>File -> Export -> select the place where to export.
>>>When I insert it to another table it behaves the same:
>>>
>>>INSERT INTO bpeng_m SELECT * FROM bp_eng 
>>>
>>
>>Maybe you have 26 deleted records and your SET DELETED is ON?
>Yes, you're right. But...
>When i set "SET DELETED OFF", I can see the 26 deleted records in the table.
>Why does VFP calculate the deleted records in the number of the total records when they have been deleted?
>Or is there a way to set it to show the correct record number?


Because they are in table :-)
Also, number of records are stored in DBF header. When you use RECCOUNT() function VFP didn't calculate number of records, it just read their number from DBF header.
Nom you can't set it to show the nimber you want, but you could calculate non deleted records by youself and show them to the user:
SET DELETED ON
COUNT TO lnRecNo
? lnRecNo
** or
SELECT COUNT(*) FROM YourTable INTO ARRAY laRecNo
? laRecNo[1]
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform