Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank rows in between data in DBF File

Status
Not open for further replies.

weirdguy89

IS-IT--Management
Aug 4, 2010
2
BN
Hello,

My company is currently still use FoxPro2.5 DOS Application for POS, Inventory and Accounting system. Honestly, it is still a complete system, eventhough it had aged dramatically.

The problem occurs when we would like to view the purchase history for a certain item. A large chunks of purchase transaction inclusive the latest are not listed. However, when I manually opened the DBF using a third-party application, there are more than 100 rows of records are empty in between the old and latest data.

Anyone care to share opinion/solution for this problem?

The company that used to built this problem is not available to attend to the program's problem as they dissolve their software division long ago and currently do not have the expertise to do so.
 
How about if you manually open the data table with your own copy of Foxpro?

NOTE - if you need a copy look at:

Within your own Foxpro you should be able to see if there are empty records in the table or not. By using your own Foxpro you are not reliant on someone else's (3rd party vendor's) manner of displaying the data.

Not knowing how/when/why records might be updated in the data table makes it VERY difficult for us to guess how problems might have occurred. Perhaps someone's workstation locked up during a record write.

Regardless, once you know if the records are truly empty or not will help you make the decision as to how to go forward.

Good Luck,
JRB-Bldr
 
Hello jrbbldr,

Thanks for your reply.

I had followed your instruction by using FoxPro to identify any empty records and found empty rows of records in between the old and latest data entry.
 
Obviously there are too many variables for me to even begin to guess as to why these blank/empty records exist.

But now that you have confirmed that what you are visually seeing is the result of REAL Records in the data table with unusual data in them (No Data), you can make up your mind as to how to deal with it.

NOTE - before you do anything to the data, make a backup of the data table so that - if all else goes 'south' you can restore to the original.

If you want to eliminate them, you can merely Delete the rows and then PACK the data table.
Code:
* --- Totally Eliminate Empty Records In Table ---
USE MyData IN 0 EXCLUSIVE  && I don't know your table name
SELECT MyData
DELETE FOR EMPTY(Field1)  && And I don't know your field names
PACK
USE

If you want to do something else with these empty records, let us know and we'll advise you.

Good Luck,
JRB-Bldr
 
2 comments:
If this is 3rd party software, it may intentionally use blank records. It may delete a transaction by overwritng with blak data, and intend to infill that space later with new data

Are you reaching the maximum size of the table? I presume your software packs the table occassionally.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top