JavaScript Editor js editor     Web development 



Main Page

Specifies the number of update statements sent to the remote data source for buffered tables. When working with this property for regular cursors, use the CURSORSETPROP() and CURSORGETPROP() functions. Read/write.

Adjusting BatchUpdateCount can increase automatic updating performance dramatically.

Note:
Setting BatchUpdateCount for CursorAdapter objects overrides the property setting of a cursor when attached to a CursorAdapter object. That is, changing the settings on the cursor using CURSORSETPROP() has no effect.

CursorAdapter.BatchUpdateCount [ = nValue]

Return Value

nValue


Numeric data type. The nValue parameter has a default value of 1.
Note:
When you are updating data, using Table Buffering, and updating the table or tables in the data source from multiple clients, avoid setting BatchUpdateCount to a value greater than 1. In these scenarios, TABLEUPDATE(В ) always returns True (.T.). You can safely set BatchUpdateCount to a value greater than 1 for INSERT, UPDATE, and DELETE operations when lForce in TABLEUPDATE(В ) is set to True (.T.).

Remarks

Applies To: CursorAdapter Class

BatchUpdateCount applies to CursorAdapter objects only when the data source type for the SQL INSERT, UPDATE, and DELETE commands is one of the following:

  • "ODBC"

    Additionally, the same connection handle must be used as the data source for the SQL INSERT, UPDATE, and DELETE commands.

    Note:
    The data source and data source type might be inherited from the DataSource and DataSourceType properties of either the CursorAdapter or DataEnvironment object.

  • "ADO"

    The same ADODB Command object must be used as the data source for the SQL INSERT, UPDATE, and DELETE commands. It is recommended that you set the InsertCmdDataSource, InsertCmdDataSourceType, UpdateCmdDataSource, UpdateCmdDataSourceType, DeleteCmdDataSource, and DeleteCmdDataSourceType properties explicitly because inheritance does not work in this scenario.

  • "XML"

    It is recommended that you set the InsertCmdDataSource, InsertCmdDataSourceType, UpdateCmdDataSource, UpdateCmdDataSourceType, DeleteCmdDataSource, and DeleteCmdDataSourceType properties explicitly because inheritance does not work in this scenario.

If BatchUpdateCount is greater than 1, Visual FoxPro updates the batch by executing the UpdateCmd property once per batch.

Note:
If batch updating is used, the BeforeInsert, AfterInsert, BeforeUpdate, AfterUpdate, BeforeDelete, and AfterDelete events do not fire. If an update fails for a batch, Visual FoxPro attempts to send a separate update for each row in the batch; however, the events still do not fire.

See Also



JavaScript Editor js editor     Web development