AO insert object

Source: Internet
Author: User
AO insert object
When adding records to Table and FeatureClass, there are several optional insert methods. They have different efficiency in different use environments ......
1 Store Method
Store using IRow and IFeature
The CreateRow () CreateFeature () method of ITable or IFeatureClass first creates an object and calls Store
The speed of this method is low in various environments.
However, the most comprehensive information is obtained.
Applicable to data objects generated by UI Interaction
A) Perform a database access at CreateRow () [insert]
B) after creation, the OID value is returned in the Row.
C) Call Store after assigning values to other fields for the second database access [updata]. In this case, the onChange and other event calls of the Row object are triggered.
--------------
2 WriteRow Method
Use ITableWrite. WriteRow () or IFeatureClassWrite. WriteFeature ()
The CreateRow () CreateFeature () method of the ITable or IFeatureClass first creates an object.
Call ITable. WriteRow () or IFeatureClass. WriteFeature () after the assignment ()
This method calls lower-level interfaces such as ITableWrite.
The difference is that the event is not triggered when data is written.
Writing geometric network layer data faster without affecting the network topology of Objects
A) Perform a database access at CreateRow () [insert]
B) after creation, the OID value is returned in the Row.
C. Call Store to access the database for the second time [updata] After assigning values to other fields. This does not trigger events.

-----------------
3 Insert Buffer
Use ITable. CreateRowBuffer () or IFeatureClass. CreateFeatureBuffer () to create a memory object
The database access speed is faster only once written by IFeatureCursor. InsertFeature ()
However, before writing the memory object
OID =-1 is applicable to simple elements of batch writing.
A) create a memory object in CreateRowBuffer ()
B) after creation, OID =-1 is already in Row.
C) Call ICursor. Insert () to Insert a database after assigning values to other fields.
No event




The above is my search on the Internet.
When inserting an object, such as FeatureClass, there is no problem. however, I inserted my own business tables. this table is not created by ARCMAP. it seems that the OBJECTID cannot be used to add value on its own. I would like to ask how to solve this problem.
That is, how to operate your own business tables in arcgis server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.