keith@seismo.UUCP (Keith Bostic) (07/12/84)
I've got a dBase II program that's giving a bit of trouble. Here's
a portion of it. It's supposed to be a menu that reads an option entered
by the user. As long as a valid option is entered, the program functions
correctly. When an invalid option is entered, the program abends and
returns the user to the dBase II prompt.
=========================================================================
SET ECHO OFF
SET EXACT ON
SET TALK OFF
SET BELL OFF
SET CONFIRM OFF
SET INTENSITY OFF
STORE ' ' TO OPTION
STORE ' ' TO EXIT
ERASE
DO WHILE EXIT = 'F'
@ 1,35 SAY 'CLASS ABCD'
@ 3,10 SAY 'LOGIN CODE'
. Format the rest of the screen.
.
.
READ
DO CASE
CASE OPTION = 'K'
DO NUCH
CASE OPTION = 'N'
DO COMD
. Based on user entry DO some specified routine.
. Now, here's where we're having problems.
. It's with the OTHERWISE command:
OTHERWISE
? CHR(7)
@ 24,3 SAY '*** INVALID OPTION ***'
ENDCASE
STORE ' ' TO OPTION
STORE 'F' TO EXIT
ENDDO
=========================================================================
I'd appreciate any help anyone can offer. Thanks a lot. Also, we've tried
to find some documentation to answer the problem -- and were unsuccessful.
If you have some, could you reference it? Again, thanks.
Keith
ARPA: keith@seismo
UUCP: seismo!keithlitvin@uiucuxc.UUCP (07/18/84)
#R:seismo:-195500:uiucuxc:34500008:000:277 uiucuxc!litvin Jul 18 09:45:00 1984 * * I was unable to duplicate your problems using dBASE Version 2.41. It appears that the broken code is not among the listed. BTW, you DON'T want to store ' ' to exit BEFORE you test for the do while loop with exit = 'F'! John Litvin AISS University of Illinois
dont@tekig1.UUCP (Don Taylor) (08/09/84)
X
The first serious work I've tried to use dBASE for and I find troubles.
I created a file with a 6 char field, a 20 char field, and 2 10,2 numeric
fields. I do an append and enter no records, append and enter some records,
edit some of the records, turn carry on and off, etc. I display all and get
all the records entered, but edit gives record out of range. Display status
gives 89 records while display all shows all 500+. Ashton Tate says there are
embedded ^Z's and tells me how salvage all the records except the one with the
^Z inside. Their explanation is 'well you must of hit some wrong keys, or the
power glitched, or there was static or something'. This problem occured over
and over in the file. It sounds EXTREMELY remote that the static has this thing
about ^Z's. I think there is still some bug in 2.4 that writes this into the
file, but they are not going to listen to this. Can anybody reproduce this so
we can either take them to task, or so WE can find a fix. I have also had it
throw me back to the '.' with carry on, and tapping linefeed at each field, to
enter a duplicate record. Anybody seen this one either?
Thanks
Don Taylor
tektronix!tekig1!dontjulian@ecsvax.UUCP (08/16/84)
dBase does not save a file until the next USE is issued. I have noticed some erratic problems with adding new data to files, and trying to get it back immed- iately. A kludge to work around the problem of retrieving recently used records is to give one or more USE commands, and re-use the original file. The USE is supposed to write out the file, but I say 'one or more' because it may take a few to work. I hopr you are not working with a canned program. The use command involves overhead by writing to the disk.