Hi,
I am writing a program using the DBAS database package downloaded from Dilwyn's site and have hit a problem.
I have opened a database and selected records as follows:
RESET#6
ORDER#6;2,1
EXCLUDE#6
INCLUDE#6;9,"=",name$;"AND";6,"<>","Y"
INCLUDE#6;5,"=",name$;"AND";11,"<>","Y";"AND";7,"=","3"
Then I display the contents of the included records. For each one of these there can be an action as follows:
SEARCH#6;10,"=",balid(i)
IF NOT FOUND(#6) THEN REPORT_ERROR -7 :STOP
a$=FETCH(#6,9)
IF a$<>name$ : SET#6;11,w$ : ELSE SET#6;6,w$
UPDATE#6
balid(I) is a unique key value that was stored when the records were read to ensure just the correct record is updated.
The program fails at the UPDATE statement, with error code 32814 (!?!). If I look at the database, the SET statement HAS been applied, i.e. the update has worked.
Does anyone with more experience of DBAS have any ideas....I'm sure it's something that I am doing, but I can't see what.
Thanks in advance.
Jon
DBAS package problem
Re: DBAS package problem
With the lack of response, I get the feeling that DBAS is not well used or understood.
I've got around that problem now (can't remember what I did...) but now I've hit a real show stopper. Following the insert of a new record, a re-read of a selection of records (not including the inserted one) gives one less record than there is. If I restart the program it runs through the same selection code and gives the correct value. The code is:
RESET#4 : REMark Reset record selection
EXCLUDE#4 : REMark Exclude all records
INCLUDE#4;2,"=",4;"AND";14,"<>","Y" : REMark Include just type 4 records where CLOSED not not set to Y
ORDER#4;7,1 : REMark Sort in ascending name order
accountc=COUNT(#4) : REMark Update count of records
I had hoped to get my programming working using DBAS, but with record selection that seems to work sometimes and not others, I think I may have to try something else. Is there anything else?
I've got around that problem now (can't remember what I did...) but now I've hit a real show stopper. Following the insert of a new record, a re-read of a selection of records (not including the inserted one) gives one less record than there is. If I restart the program it runs through the same selection code and gives the correct value. The code is:
RESET#4 : REMark Reset record selection
EXCLUDE#4 : REMark Exclude all records
INCLUDE#4;2,"=",4;"AND";14,"<>","Y" : REMark Include just type 4 records where CLOSED not not set to Y
ORDER#4;7,1 : REMark Sort in ascending name order
accountc=COUNT(#4) : REMark Update count of records
I had hoped to get my programming working using DBAS, but with record selection that seems to work sometimes and not others, I think I may have to try something else. Is there anything else?