public void SetObjectIDFields( string objectIDFields )
Public Sub SetObjectIDFields( _ ByVal objectIDFields As String _ )
Parameters
- objectIDFields
- A comma-separated unique key field(s).
public void SetObjectIDFields( string objectIDFields )
Public Sub SetObjectIDFields( _ ByVal objectIDFields As String _ )
Exception | Description |
---|---|
ArcGIS.Core.Data.Exceptions.GeodatabaseException | A database-related exception has occurred. |
public async Task JoinQueryDescription() { await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { DatabaseConnectionProperties databaseConnectionProperties = new DatabaseConnectionProperties(EnterpriseDatabaseType.SQLServer) { AuthenticationMode = AuthenticationMode.DBMS, Instance = "instance", Database = "database", User = "user", Password = "password" }; using (Database database = new Database(databaseConnectionProperties)) { QueryDescription queryDescription = database.GetQueryDescription("SELECT BUSLINES.ID as BUSLINESID, BUSSTOPS.ID as BUSSTOPSID, BUSLINES.RTE_DESC, BUSLINES.DIR, BUSSTOPS.JURISDIC, BUSSTOPS.LOCATION, BUSSTOPS.ROUTE,BUSSTOPS.SHAPE from demosql.dbo.BUSSTOPS JOIN demosql.dbo.BUSLINES ON BUSSTOPS.ROUTE = BUSLINES.ROUTE", "BusInfo"); queryDescription.SetObjectIDFields("BUSLINESID,BUSSTOPSID"); using (Table table = database.OpenTable(queryDescription)) { // Use the table. } } }); }
Target Platforms: Windows 11, Windows 10, Windows 8.1