version 2004 (Modified)
The following table lists the syntax error codes for errors that may occur during code execution in the Design or Application environment. Some of these errors may occur in interpreted mode only, some in compiled mode only, some in both modes. You can intercept these errors using an error interruption method installed using ON ERR CALL.
Code | Description |
1 | A "(" was expected. |
2 | A field was expected. |
3 | The command may be executed only on a field in a subtable. |
4 | Parameters in the list must all be of the same type. |
5 | There is no table to which to apply the command. |
6 | The command may only be executed on a Subtable type field. |
7 | A Numeric argument was expected. |
8 | An Alphanumeric argument was expected. |
9 | The result of a conditional test was expected. |
10 | The command cannot be applied to this field type. |
11 | The command cannot be applied between two conditional tests. |
12 | The command cannot be applied between two Numeric arguments. |
13 | The command cannot be applied between two Alphanumeric arguments. |
14 | The command cannot be applied between two Date arguments. |
15 | The operation is not compatible with the two arguments. |
16 | The field has no relation. |
17 | A table was expected. |
18 | Field types are incompatible. |
19 | The field is not indexed. |
20 | An "=" was expected. |
21 | The method does not exist. |
22 | The fields must belong to the same table or subtable for a sort or graph. |
23 | A "<" or ">" was expected. |
24 | A ";" was expected. |
25 | There are too many fields for a sort. |
26 | The field type cannot be Text, Picture, Blob or Subtable. |
27 | The field must be prefixed by the name of its table. |
28 | The field type must be Numeric. |
29 | The value must be 1 or 0. |
30 | A variable was expected. |
31 | There is no menu bar with this number. |
32 | A date was expected. |
33 | Unimplemented command or function. |
34 | Accounting files are not open. |
35 | The sets are from different tables. |
36 | Invalid table name. |
37 | A ":=" was expected. |
38 | This is a function, not a procedure. |
39 | The set does not exist. |
40 | This is a procedure, not a function. |
41 | A variable or field belonging to a subtable was expected. |
42 | The record cannot be pushed onto the stack. |
43 | The function cannot be found. |
44 | The method cannot be found. |
45 | Field or variable expected. |
46 | A Numeric or Alphanumeric argument was expected. |
47 | The field type must be Alphanumeric. |
48 | Syntax error. |
49 | This operator cannot be used here. |
50 | These operators cannot be used together. |
51 | Module not implemented. |
52 | An array was expected. |
53 | Indice out of range. |
54 | Argument types are incompatible. |
55 | A Boolean argument was expected. |
56 | Field, variable, or table expected. |
57 | An operator was expected. |
58 | A ")" was expected. |
59 | This kind of argument was not expected here. |
60 | A parameter or a local variable cannot be used in an EXECUTE statement |
in a compiled database. | |
61 | The type of an array cannot be modified in a compiled database. |
62 | The command cannot be applied to a subtable. |
63 | The field is not indexed. |
64 | A picture field or variable was expected. |
65 | The value should contain 4 characters. |
66 | The value should not contain more than 3 characters. |
67 | This command cannot be executed on 4D Server. |
68 | A list was expected. |
69 | An external window reference was expected. |
70 | The command cannot be applied between two Picture arguments. |
71 | The SET PRINT MARKER command can only be called in the header of a form being |
printed. | |
72 | A pointer array was expected. |
73 | A numeric array was expected. |
74 | The size of arrays does not match. |
75 | No pointer on local arrays. |
76 | Bad array type. |
77 | Bad variable name. |
78 | Invalid sort parameter. |
79 | This command cannot be executed during the draw of a list. |
80 | Too many query arguments. |
81 | The form was not found. |
Tips
Some of these error codes denote plain syntax errors due to mistyping. For example, you get an error #37 if you execute the statement v=0 when you actually meant v:=0. You can eliminate the error by fixing your code in the Method editor.
Some of these error codes are due to simple programming errors. For example, you get an error #5 if you execute an ADD RECORD command, when you have not first set the default table (using the DEFAULT TABLE command), and do not pass the table parameter. In this case, there is no table to which to apply the command. You eliminate the error by checking to see if you forgot to set the default table or if you forgot to pass the table parameter to the command for this occurrence.
Some of these error codes denote errors due to a flaw in the design. For example, you get an error #16 if you apply RELATE ONE to a field that is not related to any other field. You eliminate the error by checking to see if your code is actually wrong or if you simply forgot to create the relation starting from the field.
Some errors, when they occur, are not always located exactly where your code breaks. For example, if in a subroutine you get an error #53 (indice out of range) on the line vpFld:=Field($1;$2), the error is due to a wrong table and/or field number that has been passed to the subroutine as a parameter. Therefore, the error is located in the caller method and not where the error actually occurs. In this case, trace your code in the Debugger window to determine which line of code is the real culprit, then fix it in the Method editor.
See Also