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

Selecting "Hidden" records 1

Status
Not open for further replies.

Swi

Programmer
Feb 4, 2002
1,963
US
My company uses a software that uses DBF's as the backend database format. You have the ability to "Hide" records in the program. When doing queries using ADO they do not show up which is good in most cases. How do I access the "Hidden" records? I have not worked with DBF's in such a long time but from what I remember you need to pack the database in order to actually delete the records. Thanks.

Swi
 
Swi,

There aren't any hidden records, just records that aren't getting displayed. The program you use to interface the dbf is limiting the records that are getting displayed. You can use dbase to browse, list or pack out those records if they were marked for deletion. But the interface that you use to access the data is the thing that is controlling the records that you can see. Any utility that can open a dbf file can let you view these records.

Jim C.


 
I would like to access these records that are marked for deletion using ADO. Is this possible? Thanks.

Swi
 
Swi,

I have never used ADO, don't even know what it is. Is it supposed to allow you to open a DBF file.

Jim C.
 
Yes. To clarify, I am using VB6 and ADO as the database connection. Here is the connection.

Code:
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
conn.CursorLocation = adUseServer
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Path & ";Extended Properties=dBASE 5.0;User ID=;Password="

Swi
 
to Volker, re dissapearing records in dbase... I run a small retail store and programmed my own POS system, and I ran into the same problem - I would browse an open .dbf and get "end of file encountered" I then go bott and brow - and the records are there, however they don't stay - when I pack the file they are gone.... I consulted my old Programming teacher and we tried a few tricks until we decided to del the .dbf file and create the same file again " from scratch " - ans siehe da - it worked, maybe it will help you too
 
kanuck1,

What your talking about is corruption. I've seen it when browsing files in dbase, but if I switch to FOXPROW it's looks OK. To clean it up, I'll use FOXPROW to create a delimited file, and then zap the original file, and then append from the delimited file back into the original structure, create a new set of indexes and it's clean going forward. If it comes back, then something is causing it to reappear. The end of file marker isn't actually correct, may be two or more end of file markers.

Jim C.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top