Solved

Random Access files

Posted on 1998-06-29
2
145 Views
Last Modified: 2010-05-03
I know how to open a file as random access and how to get, search, and save records to it; how do you delete a record, though?
0
Comment
Question by:showme
2 Comments
 
LVL 2

Accepted Solution

by:
rayb earned 20 total points
ID: 1464537
Sorry, but it's not as easy as those other operations.
The exact technique you employ is dependent upon your needs.  When I've needed to do this in the past, I marked the records by my own methods as ready to be deleted.  However you do this is up to you, maybe set the ID to a negative one.  Then implement your own compact method to compact the file.  The way I would handle this is to create a temporary file, copy in all the good records from the old file, close both files, delete the old one and replace it with the new one.

0
 

Author Comment

by:showme
ID: 1464538
Do you know of any good VB books that cover random access files and the like?  And, thanks for the advice.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question