BBS: Inland Empire Archive
Date: 03-24-92 (16:08) Number: 165
From: RICHARD VANNOY Refer#: NONE
To: SHAWN BOWLBY Recvd: NO
Subj: Help needed!!! Conf: (2) Quik_Bas
SB> Hello, i am very new to programming and i was wondering if someone on
SB>this net could help me out?? Could someone tell me the easiest way to
SB>"Edit/Delete" a specific record in a sequential file?
SB> I imagine it involves using the SWAP keyword, but the exact procedure
SB>escapes me. Any and all help would be greatly appreciated...
SWAP won't work in a sequential file.
Try something like this..
OPEN "GOODSTUF.DAT" FOR INPUT AS #1
OPEN "GOODSTUF.BAK" FOR OUTPUT AS #2
WHILE NOT EOF(1)
PRINT "Delete/Edit/Store? (D/E/RETURN) ";
LOOP UNTIL LEN(k$)
SELECT CASE UCASE$(k$)
INPUT "Enter new record: ";rec$
Then just KILL the .DAT and rename the .BAK to .DAT.
!!! BACK UP YOUR DATA BEFORE TRYING THIS !!! (or any code
that can destroy files!
> MegaMail 2.1b #0:Stamp out, eradicate, and eliminate redundancy!
--- WM v2.01/91-0012
* Origin: Com-Dat BBS Hillsboro, OR. HST (503) 681-0543 (1:105/314)