laptop and a wrench

不具合

AddJoin gives error when joining a SqlServer table with no ObjectID.

最後に公開された状態: August 25, 2014 ArcGIS for Desktop
不具合 ID 番号 NIM039018
送信されましたOctober 3, 2008
最終更新日June 5, 2024
適用対象ArcGIS for Desktop
見つかったバージョン9.3
オペレーティング システムWindows OS
オペレーティング システムのバージョンXP
ステータスDuplicate

参考情報

Duplicate of NIM038601

対処法

Use ArcObjects code IMemoryRelationshipClassFactory & IDisplayRelationshipClassSee sample below.Public Sub joinATable() On Error GoTo EH Dim pDoc As IMxDocument Dim pMap As IMap Set pDoc = ThisDocument Set pMap = pDoc.FocusMap ' Get the first layer in the table on contents Dim pFeatLayer As IFeatureLayer Dim pDispTable As IDisplayTable Dim pFCLayer As IFeatureClass Dim pTLayer As ITable If pMap.LayerCount = 0 Then MsgBox "Must have at least one layer" Exit Sub End If Set pFeatLayer = pMap.Layer(0) Set pDispTable = pFeatLayer Set pFCLayer = pDispTable.DisplayTable Set pTLayer = pFCLayer ' Get the first table in the table on contents Dim pTabCollection As IStandaloneTableCollection Dim pStTable As IStandaloneTable Dim pDispTable2 As IDisplayTable Dim pTTable As ITable Set pTabCollection = pMap If pTabCollection.StandaloneTableCount = 0 Then MsgBox "Must have atleast one table" Exit Sub End If Set pStTable = pTabCollection.StandaloneTable(0) Set pDispTable2 = pStTable Set pTTable = pDispTable2.DisplayTable ' Create virtual relate Dim pMemRelFact As IMemoryRelationshipClassFactory Dim pRelClass As IRelationshipClass Set pMemRelFact = New MemoryRelationshipClassFactoryDim strJoiningFieldinTable As StringDim strJoiningFIeldinFeatureClass As StringstrJoiningFieldinTable = "inty"strJoiningFIeldinFeatureClass = "Fid" Set pRelClass = pMemRelFact.Open("TabletoLayer", pTTable, strJoiningFieldinTable, pTLayer, _ strJoiningFIeldinFeatureClass, "forward", "backward", esriRelCardinalityOneToOne) ' use Relate to perform a join Dim pDispRC As IDisplayRelationshipClass Set pDispRC = pFeatLayer pDispRC.DisplayRelationshipClass pRelClass, esriLeftOuterJoin MsgBox ("done") Exit SubEH: MsgBox Err.Number & " " & Err.Description End Sub

再現の手順

不具合 ID: NIM039018

ソフトウェア:

  • ArcGIS for Desktop

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動