The code that opens the DB.....
Instead of test in the call it shoudl be the name of your Data Connection that you created in Designer. Something like this:
Hope that helps
Hello, and thank you for your answer!
Indeed there was a mistake in typing the string name in the code, from some previous attempts.
The connection string i have created in designer is named ControlConnection. I changed it but i get the same error.
and the error is:
GeneralError: Operation failed.
Invalid property get operation; packet doesn't have property 'ControlConnection'
This must come from somewhere else
The connection test to the database when i create the connection string is succesfull ...everything seems fine untill i push the button.
Any other ideeas?
But (according to the image) the Data Connection name is DataConnection2 not ControlConnection.
Also can you try something else other than addNew? Use a Next or Previous function to move through records (I am trying to eliminate security issues and validate that the connection is working.
You may also want to add an Open command before you do your command (to ensure that there is a connection to the DB).
I have tryied with next, previous, update etc...but everything gives the same error.
As for that image, i have added it later, so yeah the string was named bit different..sorry for the confusion.
Regarding Open command: could you be more specific how to use it in this case? because on adobe forums only xfa.sourceSet.DataConnection.first();(where only the DataConnection name has to be modified accordingly) seems to be enough.
The documentation that lead me to this is found here:
And stefan cameron's tutorials:
Problem is that nowhere on the forums can i find this type of error i'm getting...it's like the program doesn't recognise the connection string i have created in it.
Could this be from the drivers used to create the System DSN? (i have tryied with both SQL Server and SQL Native Client drivers, on remote and local server)
But the connection tests work perfect..so i really have no clue what is happening.
1 person found this helpful
The error seems to indicate that the dataconnection name that you are using is not found .......so that is before the connnection to the server is even happening. I do not know why it is happening either .....can you send me the form and I will have a look. Send it to LiveCycle8@gmail.com and include a description of the issue in the email.
Sorry for reviving this old thread, however I am having the exact same issue as OP and I still can't find any sort of solution on google or this website on this issue. I have even try using Microsoft Access as the Database by following the steps on this youtube video http://www.youtube.com/watch?v=C56_Cz-aE0c but I keep getting the same error? Can someone please help?