In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Version 3 Technical Highlights - ValidateName

This is a function designed to check whether a given name will conflict with SQL/system reserved words or rules. It is passed the name to validate and a Boolean flag which is used to indicate whether changes are permitted (true for yes, false for no). It returns either the word, the modified word or a pass/fail flag.

If changes are permitted the system will modify SQL reserved words or variables beginning with an integer by putting an "A" at the beginning (try using KEY as a column name in DEFINETABLE to see an example of this). It will also truncate names longer than 50 characters and convert lowercase to uppercase.

If changes are not permitted it will return a true/false flag to indicate whether the name conforms to SQL naming conventions. If a false flag is returned the reason is given in @FILE.ERROR, with return codes ranging from S110 to S115, with meanings as follows

        S110   Starts with a number
        S111   Longer than 50 characters
        S112   Contains invalid characters
        S113   Reserved by the system (in testing it proved impossible to
               produce this message with SYS table names or VOC commands)
        S114   Reserved by SQL
        S115   Does not start with a letter (could only get this to fail if
               the name started with an underscore. All other characters
               caused an S112.
(Volume 4, Issue 6, Page 7)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel