IsValidName
Description
Validates whether the name is valid for the given type. This method checks whether the name contains invalid characters, is of a valid length, and does not conflict with any reserved words. This method does not verify that the name can actually be used for the purpose identified by type, since it does not check whether an object of the given name and type already exist.
Note: This
method became available in version 7.1.
Syntax
VBScript
adminSession.IsValidName
name, type
Perl
$adminSession->IsValidName
($name, $type);
- Identifier
- Description
- adminSession
- The AdminSession object representing the current schema repository access session.
- name
- A String that identifies the name you want to validate.
- type
- A Long identifying the name type. The NameType enumerated constant
became available in version 7.1. and includes these constants and
values:
- DATABASE_NAMETYPE - 1
- USER_NAMETYPE - 2
- GROUP_NAMETYPE - 3
- SCHEMA_NAMETYPE - 4
- DBCOLUMN_NAMETYPE - 5
- ENTITYDEF_NAMETYPE - 6
- FIELDDEF_NAMETYPE - 7
- ACTIONDEF_NAMETYPE - 8
- STATEDEF_NAMETYPE - 9
- HOOKDEF_NAMETYPE - 10
- Return value
- Returns an empty String if the validation is successful, or a String containing the reason for failure if the validation is unsuccessful.