ERROR

Failed to rename selected object(s). [Invalid characters in the object name.]

Last Published: April 25, 2020

Error Message

When renaming an object in ArcCatalog, the following error message appears:

"Failed to rename selected object(s)
[Invalid characters in the object name]"

Depending on what is being renamed, the message may also contain one of the following phrases:

"The table name is invalid
The dataset name is invalid
The topology name is invalid"

Cause

The new name of the object contains characters that the underlying database considers invalid. The list of invalid characters differs depending on the database.

Solution or Workaround

Rename the object using characters that are valid for the underlying database. A list of invalid characters can be obtained with the following macro. Select the Geodatabase within ArcCatalog and run the macro, a message box listing the invalid starting characters and invalid characters will be displayed.
Code:
Public Sub GetInvalidCharacters()
Dim pApp As IGxApplication
Dim pGxObj As IGxObject
Dim pGxDB2 As IGxDatabase2
Dim pSDEWS As IWorkspace
Dim pSQLSyntax As ISQLSyntax
Dim strInvalidChr As String, strStartingInvalidChr As String

Set pApp = Application
Set pGxObj = pApp.SelectedObject
If TypeOf pGxObj Is IGxDataset Then Set pGxObj = pGxObj.Parent

'If for some reason we're not connected to a GDB, Exit
If Not TypeOf pGxObj Is IGxDatabase2 Then Exit Sub
Set pGxDB2 = pGxObj

Set pSDEWS = pGxDB2.workspace
Set pSQLSyntax = pSDEWS 'QI

strStartingInvalidChr = pSQLSyntax.GetInvalidStartingCharacters
strInvalidChr = pSQLSyntax.GetInvalidCharacters

MsgBox "Invalid Starting Characters: " & strStartingInvalidChr & vbCrLf & "Invalid Characters: " & strInvalidChr

End Sub

    Article ID:000006201

    Software:
    • ArcMap

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options

    Discover more on this topic