Expand my Community achievements bar.

error: this operation violates your permissions configuration

Avatar

Former Community Member
Hello: I have a form with a dropdown list and 4 text fields.



The dropdown list has 3 values (Committee 1, Committee 2, and committee 3)



In access 2007 I have a database with the names of the people on each committee.



The following code is on the exit button of the dropdown list:



$sourceSet.TIMSTEST.#command.query.commandType = "text"

$sourceSet.TIMSTEST.#command.query.select.nodes.item(0).value = Concat("Select * from Tmp_Committee where Description = '", this.rawValue, "'")

$sourceSet.TIMSTEST.open()

//xfa.host.messageBox("TIMSTEST opened")



$sourceSet.TIMSTEST.close()

//xfa.host.messageBox("TIMSTEST closed")



When I open the form I automatically get the first record in the database.

When I choose another value in the dropdown I get this error:



error: this operation violates your permissions configuration



Please help.



Thank you
47 Replies

Avatar

Level 2

Hi Paul,

Am trying to update database column using below script but it errors

oDC.#command.query.select.nodes.item(0).value = ("update employee set cnt

=",cnt.rawValue," where employee_id =",employee_id.rawValue,"")

Same like the select query. I searched on forum too but didn’t find any

Any help is appriciated

Thanks

Avatar

Former Community Member

In version 8 of Acrobat there was a security concern about changing the values in the SourceSet dom on the fly. You are running into that issue as you getting a permissions violation when doing this.

This post explains the issue and the solution nicely:

http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/

Paul

Avatar

Level 2

Hello Paul,

The Link was very helpful but I still couldn’t figure out how to update DB

on click event of button

Avatar

Level 2

Error message: "ado2xfa operation failed. Item cannot be found in the

collection corresponding to the requested name or ordinal."

But when I check the Database record I see it is updated

Avatar

Level 2

Hi Paul,

How do we handle errors I Formcalc script?

If the query do not return any value then need to display some alert or

display all fields as null.

Avatar

Level 2

Strange part is when I do

xfa.host.messageBox

(xfa.sourceSet.DataConnection2.#command.query.commandType)

It alerts (text) but when I assign

xfa.sourceSet.DataConnection2.#command.query.commandType= "text" it

errors.....is it something with permission issue on database object?