BUG
When copying data into a geodatabase, objects are renamed to include an underscore character.
The original name of the object corresponds to a reserved keyword in the underlying destination DBMS.
Code:
Public Sub GetDatabaseKeywords()
Dim pApp As IGxApplication
Dim pGxObj As IGxObject
Dim pGxDB2 As IGxDatabase2
Dim pSDEWS As IWorkspace
Dim pSQLSyntax As ISQLSyntax
Dim pDBConnInfo As IDatabaseConnectionInfo
Set pApp = Application
Set pGxObj = pApp.SelectedObject
'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
Dim pEnumBSTR As IEnumBSTR
Dim str As String
Set pEnumBSTR = pSQLSyntax.GetKeywords
pEnumBSTR.Reset
str = pEnumBSTR.Next
Do Until str = ""
Debug.Print str
str = pEnumBSTR.Next
Loop
End Sub
Article ID:000006581
Get help from ArcGIS experts
Download the Esri Support App