Update a Secondary Data Source (Access) in Code

D

Doug Carlson

Is it possible to update a secondary data source, based upon an Access
database, in a form's JScript?

In this case, the form contains an optional serial number. When the form is
submitted, the form's serial number is calculated from a 1-row control table
- the secondary, Access data source - as simply serial number + 1. But how
to update the control table with the new value for the serial number - ready
for the next form?

The actions on a form "Submit" button are pretty straightforward if the
particular form is supposed to get a serial number: Query the control table,
set serial number field's value in the form, and submit the form using the
main connection (also Access).

Adding the control table to the main connection so that the table is updated
at the same time the form is submitted and updates the database works fine.

But the problem with the control table in the main connection is that if
user A is filling out a form, and before submitting that form the control
table is updated by say, user B having submitted another form, then user A
when trying to submit their form recieves the IP/Access message:

InfoPath cannot submit the form.
An error occurred while the form was being submitted.
[0x80040E38][Microsoft Cursor Engine] Row cannot be located for updating.
Some values may have been changed since it was last read.

Any thoughts/suggestions are appreciated. -Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top