Solved

Random Access files

Posted on 1998-06-29
2
144 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

808 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