KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: AP Add table and fields: new error codes in 2004.4
PRODUCT: 4D Pack | VERSION: 2004.4 | PLATFORM: Mac & Win
Published On: November 13, 2006

AP Add table and fields (tableName; fieldNamesArray; fieldTypesArray; fieldLengthsArray{; listFormTemplate{; detailFormTemplate}}) ->Longint

When the execution of AP Add table and fields fails, the command now returns a different code depending on the error encountered. In previous versions, a generic error (0) was returned in the case of
failure.

Here is a description of the codes that may be returned by the command:
-1 Invalid parameter (blank table name for example)
-2 A table with the same name already exists
-3 Incorrect array type (text array instead of integer array for example)
-4 Incorrect array size (the arrays are not of the same size for example)
-5 Incorrect field type (type does not exist for example)
-6 An error occurred when adding a field
-7 An error occurred when creating the table