Article ID: 191315
Article Last Modified on 5/12/2003
SET SAFETY OFF
ON ERROR WAIT WINDOW ("FIRST ON ERROR: " + CHR(13) + MESSAGE())
CREATE DATABASE Ztest
CREATE TABLE Ztest (FirstName C(20), LastName C(20))
USE Ztest EXCLUSIVE
INDEX ON LEFT(Ztest.FirstName,6) TAG FIRST6 OF Ztest && Comment this
&& line.
SELECT Ztest
USE
SET SAFETY OFF
ON ERROR WAIT WINDOW ("Second ON ERROR: " + CHR(13) + MESSAGE())
USE Ztest ALIAS CLOSE_Ztest
SET ORDER TO TAG FIRST6
USE
ON ERROR
* Clean up and delete files.
CLOSE ALL
DELETE FILE Ztest.DBC
DELETE FILE Ztest.dcx
DELETE FILE Ztest.dct
DELETE FILE Ztest.DBF
Run the program and note that the ON ERROR routine traps the following
error:
Next, place an asterisk (*) in front of the INDEX ON command in the code.
Run the code again and note that the ON ERROR command does not trap the
"Alias not found" error. In addition, the ON ERROR command does not trap
error 13 when evoked from the Command window either.
Additional query words: kbVFp300bbug kbVFp500abug kbVFp600bug kbXBase kbvfp300 kbvfp500 kbvfp600
Keywords: kbbug kbnofix kbcode KB191315