XFA Specification
Chapter 11, Forms That Initiate Interactions with Servers
Invoking ADO APIs Through the Source Set DOM
346
The table below shows all of the buttons in the form. Each of them simply invokes a method of the
controlling source object. None of these methods require parameters, because the parameters are
supplied by the source set document.
Function Performed by Button
Make a connection, select a set of records, and create
a cursor for that record set.
Rewind to the beginning of the record set.
Move backward one record in the record set.
Move forward one record in the record set.
Fast forward to the end of the record set.
Delete the current record in the record set.
Update the current record from the data in the form
(which presumably has been edited by the user).
Reload the current record from the data base.
Close the connection to the data base and free the
cursor. If updates have been made but not
committed with
updateBatch()
they are thrown
away.
Post updated records from the record set to the data
base. This commits the changes made via previous
calls to the
update()
method.
Roll back changes made via previous calls to the
update(
) method.
Repeat the query, regenerating the record set.
Insert a new record into the record set at the current
position, shifting the current and subsequent
records down one.
Cancel changes made to the data representing the
current row, prior to an invocation of the
update()
method.
Script associated with button
$sourceSet.FFADOData1.open()
$sourceSet.FFADOData1.first()
$sourceSet.FFADOData1.previous()
$sourceSet.FFADOData1.next()
$sourceSet.FFADOData1.last()
$sourceSet.FFADOData1.delete()
$sourceSet.FFADOData1.update()
$sourceSet.FFADOData1.resync()
$sourceSet.FFADOData1.close()
$sourceSet.FFADOData1.updateBatch()
$sourceSet.FFADOData1.cancelBatch()
$sourceSet.FFADOData1.requery()
$sourceSet.FFADOData1.addNew()
$sourceSet.FFADOData1.cancel()
Updates and rollbacks
Updates take place in three stages. The first two stages can be cancelled (rolled back) if the changes have
not yet been committed to the next stage. The stages are:
Updating the contents of the current row in the Data DOM by assigning to the data values or by editing
associated fields via the UI. This can be cancelled by the
cancel()
method.
Updating the contents of the current row in the data set using the
update()
method. Multiple rows
can be updated this way, one at a time. This can be cancelled by the
cancelBatch()
method.
Updating the contents of the data base using the
updateBatch()
method. This commits the
changes to the data base.
Home Index Bookmark Pages
Pages: Home Index All Pages