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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Values in Table are gone

Status
Not open for further replies.

mjmartino

IS-IT--Management
Feb 7, 2005
10
0
0
US
I just had a foxpro 2.6 database tossed into my lap about a week ago and I just got a call from the client. turns out that a table in the database appears to contain no data. I would love to verify this but I have no idea about the database (or any database realy). I was hopeing that someone could point me in the right direction to learn this stuff. I just don't even know which files to check for what. Any info would be great. Thanks in advance
 
That is a genaralized question that can have many responeses. Try to see for yourself by opening the database and browsing it, or you can check it with the function reccount() to see if records exist.

from the command prompt type in
use (yourdatabasename)
browse

this will allow you to see for yourself.

We need more info if we are to help.


Don Higgins
Crew Chief Pro Racing Analysis Software
 
if i understand you correctly (and correct me if am wrong), you don't have the application that can open and allow you to view a .dbf file (foxpro, dbase iii+, vfp, etc.). if that's so, the simplest (also dangerous) is to open the dbf in msexcel - fire up excel, press <ctrl+o> and from the "files of type" selection list, choose "dbase files" then find the desired file. just ignore the warnings but take note of them and don't save the file when you exit. also remember that this method will not display memo content more than 65,536 records.

a different approach is to create an access database and link the foxpro file there. fire up msaccess, create a blank datase, and while the table objects tab is selected, right click the blank area of the database and click "link tables", and from the "files of type" selection list, choose "dbase 5" then find the desired .dbf file. once linked, it will appear as a table object in your database and you can double-click it then to view. be careful not to edit anything if you don't inted to cuz the table contains "live" data and may give you a hard time in reverting to the previous values if you accidentally do so.

both methods are using win98se, foxpro 2.6 (windows), and msoffice 2k.

hope this helps. peace! [peace]

kilroy [trooper]
philippines

"If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get one million miles to the gallon, and explode once a year, killing everyone inside."
 
oh and i forgot to mention, BACKUP THE FILES FIRST BEFORE DOING ANY OF MY ABOVE SUGGESTIONS.

peace! [peace]

kilroy [trooper]
philippines

"If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get one million miles to the gallon, and explode once a year, killing everyone inside."
 
I just don't even know which files to check for what
Each table is held in a separate file with a dbf extension. You might also see other files with the same name but different extensions:

.cdx Index
.fpt Memo fields (free text too long for a regular field)
.bak Backup of an old dbf
.tbk Backup of an old fpt

You can (BACKUP FIRST) open and make sense of a dbf in NotePad. Data is held as plain text so you 'll be able to see whether there's something or nothing there. To go any further you need something like Fox, Excel or Access.

Geoff Franklin
 
Ok first thanks for all the help. Trying to brose the dbf file gave me and access denied error and I checked permissions and all seemed fine but I decided to look at it in notepad. The data is all there but when I run the database and try to go from record to record it just gives me 2 records and tells me last client record on file and first client record on file. The others are in there but foxpro just will not pull them up. Is it possible that the file is corrupt someway. Thanks for any help.
 
It could be that the index is corrupt, or filtered. Maybe someone created the index using some sort of filter which restricts the data to only those two records.
(Note: The index may be automatically opened when the table is opened if it is a .CDX).
After making a backup of the table, only the .dbf, try opening it. You will probably get an error that the index doesn't exist, but you should be able to read the records.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks dave. The index is automatically opened and it is a CDX. I have tried opening it and I get file access denied. Would that happen if others have it open?
 
OK I now have the dbf opening but does that mean the index is opening too. I tried a rebuild and it still resulted in only the 2 last records showing.
 
Thanks for all the help guys but I just restored the Database directories from tape after my client said they did not mind loseing a few days entries.

Thanks

Matt
 
Would that happen if others have it open?
Yes, if you try to open it exclusively while other had it open. Try adding the SHARED keyword at the end:
USE SomeTable SHARED
OK I now have the dbf opening but does that mean the index is opening too.
If there is a .CDX which has the same filename as the .DBF, Fox will attempt to open the .CDX when opening the .DBF. That is the default behavior.
...after my client said they did not mind loseing a few days entries.
Bummer. Oh well.
It's possible they wre already lost.

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top