In UniVerse Basic, if we read a record, not present in a file, with locking (after each read the record is not unlocked), it looks like this:
OPEN "VOC" TO VOC ELSE STOP 201,"VOC"
READU RECORD FROM VOC,"LISTY" THEN
CRT "1: [":RECORD:"]"
END ELSE
CRT "1: NOT ON FILE"
END
READU RECORD FROM VOC,"LISTY" THEN
CRT "2: [":RECORD:"]"
END ELSE
CRT "2: NOT ON FILE"
END
READU RECORD FROM VOC,"LISTY" THEN
CRT "3: [":RECORD:"]"
END ELSE
CRT "3: NOT ON FILE"
END
Running program, the result is:
1: NOT ON FILE
2: NOT ON FILE
3: NOT ON FILE
and is as expected, but if we tray this in UniObjects ActiveX o UniObjects .Net, the result looks like this:
1: NOT ON FILE
2: []
3: []
Oops!! The first read is as expected but the next reads return an empty record like exiting for the THEN clause rather ELSE.
If we unlock the record after each read, the result become:
1: NOT ON FILE
2: NOT ON FILE
3: NOT ON FILE
The result is the Basic program.
Another stuff to take into account.
------------------------------
Sergio Perin
Ing.
Self Registered
Buenos Aires AR
------------------------------