Parameters: buffer - A reference to a .IRowBuffer (in)ĪutomationException Flush any outstanding buffered writes to the database. This method should only be called on insert cursors. The object ID of the new Row, if there is one, is returned. InsertRow Object insertRow( IRowBuffer buffer)ĪutomationException Insert a new Row into the database using the property values in the input buffer. To delete a row retrieved from a search cursor, call IRow.Delete on the row itself. This should only be called on update cursors. The cursor must be initialized to a row (with the NextRow method) before this method can be successfully called. Parameters: row - A reference to a .IRow (in)ĪutomationException Delete the existing Row in the database corresponding to the current position of the cursor. This method should only be called on update cursors. Returns: A reference to a .IRow Throws: IOException - If there are interop problems.ĪutomationException Update the existing Row in the database corresponding to the current position of the cursor. If no rows remain in the result set, this method returns a null value. To retrieve all rows in a result set containing N rows, the application must make N calls to NextRow. The row object returned is allocated and hydrated by the cursor, and a reference to it is handed to the application. The NextRow method on a search or update cursor returns the next row in the result set to the application. Returns: A reference to a .IFields Throws: IOException - If there are interop problems.ĪutomationException Advance the position of the cursor by one and return the Row object at that position. Throws: IOException - If there are interop problems.ĪutomationException - If the ArcObject component throws an exception.ĪutomationException The Fields Collection for this cursor. If the specified field cannot be found, this method returns a value of -1. Update the existing Row in the database corresponding to the current position of the cursor.ĪutomationException The index of the field with the specified name. Insert a new Row into the database using the property values in the input buffer.Īdvance the position of the cursor by one and return the Row object at that position. How to use the field calculator using ArcObjects ICalculator calc ICursor cur calc new CalculatorClass() calc.Cursor cur ((IDisplayTable)targetLayer. The index of the field with the specified name.įlush any outstanding buffered writes to the database. Product AvailabilityĪvailable with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.ĭelete the existing Row in the database corresponding to the current position of the cursor. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted. When using cursors within an edit session, they should always be scoped to edit operations. This is why retrieving the first row may take longer than subsequent rows, and because underlying DBMS errors might be raised on the call, error handling is recommended. Note that while a cursor is created in the client's memory after a call to methods such as ITable.Search or ITable.Insert, the DBMS cursor is not created until a call to NextRow (or a similar method) is made. If both executions of the query are made within the same edit session (or database transaction with the appropriate level of isolation), the application is guaranteed not to see any changes made to the data by other concurrently executing applications. If an application needs to make multiple passes over the data, the application needs to reexecute the query that returned the cursor. Provides access to members that hand out enumerated rows, field collections and allows for the updating, deleting and inserting of rows.Ĭursors are forward only they do not support backing up and retrieving rows that have already been retrieved or making multiple passes over data. Public interface ICursor extends Serializable Interface ICursor All Superinterfaces: Serializable All Known Implementing Classes: Cursor, FeatureCursor, ICursorProxy, RelQuer圜ursor, TemporalCursor Layer will not be processed.SUMMARY: NESTED | FIELD | CONSTR | METHOD MsgBox(pGFLayer.Name + " does not have a SYM field. Dim pDataset As IDataset = pGFLayer.FeatureClassĭim pWS As IFeatureWorkspace = pDataset.Workspaceĭim pQueryDef As IQueryDef2 = pWS.CreateQueryDef Cursor = pTblCursor, everything runs without error. The GFLayer at the beginning is an iGeoFeatureLayer pointing to a file GDB featureclass. That post is 4 years old - has anything changed since then? My code works without using the cursor but it is slow when working with larger datasets. I've read another post on GIS SE on the same subject that warned against doing this. I'm trying to pass a cursor (from a querydef with a prefixclause of DISTINCT) to itablesort.cursor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |