home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
maildb3.zip
/
MAILDEL.PRG
< prev
next >
Wrap
Text File
|
1988-04-02
|
2KB
|
75 lines
STILLATIT = .T.
DO WHILE STILLATIT
CLEAR
LOOKUP = SPACE(30)
@10,12 SAY "Enter the exact name to delete"
@12,12 SAY "or just press return to exit";
GET LOOKUP
READ
IF LOOKUP = " "
STILLATIT = .F.
LOOP
ENDIF (lookup = " ")
LOOKUP = (LOOKUP)
SEEK LOOKUP
RECNUMB= RECNO()
COUNT WHILE (LNAME) = LOOKUP TO HOWMANY
IF HOWMANY = 0
@ 20,10 SAY "There is no &LOOKUP"
@ 22,10 SAY "Press a key to try again"
?CHR(7)
WAIT " "
RECNUMB = 0
ENDIF (HOWMANY = 0)
IF HOWMANY >1
CLEAR
RECNUMB = 0
SEEK LOOKUP
LIST LNAME, ADDRESS, CITY;
WHILE (LNAME) = LOOKUP
@ ROW()+3, 10 SAY "Delete which one?";
get recnumb picture "9999"
READ
ENDIF
IF RECNUMB > 0
GOTO RECNUMB
CLEAR
DISPLAY LNAME,ADDRESS,CITY
?
WAIT "Delete this record? (Y/N)" TO ANSWER
IF UPPER(ANSWER) = "Y"
DELETE RECORD RECNUMB
ENDIF (ANSWER)
ENDIF (RECNUMB >0)
ENDDO (while STILLATIT)
COUNT FOR DELETED() TO NODELS
OKTOPACK = "N"
DO WHILE OKTOPACK = "N" .AND. NODELS > 0
CLEAR
? "Records to be deleted....."
?
DISPLAY LNAME,ADDRESS FOR DELETED()
@ 23,1 SAY "Delete all these? (Y/N)";
GET OKTOPACK PICTURE "!"
READ
IF OKTOPACK <> "Y"
DELREC = 0
@ 20,1 SAY "Recall which one (by record#)";
GET DELREC PICTURE "9999"
READ
IF DELREC > 0
GOTO DELREC
IF DELETED ()
RECALL RECORD DELREC
NODELS = NODELS -1
ENDIF (deleted)
ENDIF (DELREC >1)
ELSE
SET TALK ON
PACK
SET TALK OFF
ENDIF (OKTOPACK)
ENDDO (OKTOPACK)
RETURN