Oracle + Delphi, DataSet.Insert,表中有触发器，Post以后DataSet值与数据库不同步
DataSet.Insert,DataSet.Fields.AsString := xxxxx;DataSet.Post后
查阅Oracle Ole DB文档：DBPROP_SERVERDATAONINSERT
Server Data on Insert Property
If DBPROP_SERVERDATAONINSERT (Server Data on Insert) is set to TRUE using OraOLEDB, the consumer can obtain defaults, sequences, and triggered column values from newly inserted and updated rows, if the insert and update operations are made through the rowset.
Having DBPROP_SERVERDATAONINSERT set to TRUE may degrade performance for both insert and update executions using a rowset because OraOLEDB fetches row data from the database for the newly inserted and updated row. However, if DBPROP_SERVERDATAONINSERT is set to its default value of FALSE, only the explicitly provided values for insert and update operations get returned when column values are requested for those rows.
If the base table from which the rowset was created does not contain any defaults, sequences, or triggers, it is highly recommended that DBPROP_SERVERDATAONINSERT retain its default value of FALSE.
The DBPROP_SERVERDATAONINSERT property does not affect the performance of insert and update executions using the command object.
MSDN Home > MSDN Library > Data Access > Microsoft OLE DB > OLE DB Programmer's Reference > Part 5: Appendixes > Appendix C: OLE DB Properties > Properties (Alphabetical)
OLE DB Programmer's Reference
Property group: Rowset
Property set: DBPROPSET_ROWSET
Typical R/W: R/W
Description: Server Data on Insert
VARIANT_TRUE After an insert is transmitted to the server (when IRowsetChange::InsertRow is called in immediate mode or when IRowsetUpdate::Update is called for an inserted row in deferred update mode), the consumer can call IRowset::GetData to retrieve the actual values that appeared in the data store, including calculated columns and defaults not explicitly set in the call to IRowsetChange::InsertRow.
VARIANT_FALSE The provider does not retrieve values from the data store for newly inserted rows. The consumer can retrieve only data values explicitly set in the call to IRowsetChange::InsertRow or by calls to IRowsetChange::SetData for the hRow returned by InsertRow.
Consumers should be aware that setting DBPROP_SERVERDATAONINSERT is potentially expensive and may not be supported for certain types of rowsets.
试过DataSet.properties['DBPROP_SERVERDATAONINSERT'].value := true;报错...