I'm writing a program in VB5 that needs to access an old DOS program's dBase III files. I have no problem accessing those files but I need to access the "deleted" records as well (as you know, dBase simply marks records for deletion and then hides them until the database is packed).
I don't actually need to know if a record I'm accessing is marked for deletion or not (although that would be a nice bonus), I just need to access the entire database as if "Set Deleted Off" had been set.
More specifically, when I do a SEEK, I want it to include deleted records in the seek as well.
This is the code I'm using:
So how can I include the deleted records as well?Code:Dim TableName As String Dim DBFDir As String Dim MyDBF As DAO.Database Dim MyRecSet As DAO.Recordset TableName = "ARTICLE.DBF" DBFDir = "C:\DBFS\" SearchString = "SOMEARTICLE" Set MyDBF = DBEngine.OpenDatabase(DBFDir, True, False, "dBase III;") Set MyRecSet = MyDBF.OpenRecordset(TableName, dbOpenTable) With MyRecSet .Index = DBFIndexName .Seek "=", SearchString If Not .NoMatch Then ' Found. Do something End If End With MyRecSet.Close MyDBF.Close


Reply With Quote



