Hi All
Thank you for looking at my post.
I have a form which interacts with a SQL database.
The process starts with one member of the team partially completing the form and submitting this.
xfa.sourceSet.DataConnection.addnew(); on form initiaise function
then
xfa.sourceSet.DataConnection.update(); on the submit button.
This process works great.
The next member of the team then gets the information by entering the requirement in two textboxes.
var nIndex = 0; while(xfa.sourceSet.nodes.item(nIndex).name != "DataConnection") { nIndex++; } var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1); oDB.nodes.item(1).query.setAttribute("text", "commandType"); oDB.nodes.item(1).query.select.nodes.item(0).value = "Select * from repairform where (A4 = '" + TextField11.rawValue + "') & (A5 = '" + TextField12.rawValue + "')"; oDB.open(); oDB.close();
This then populates the form with the record relating to the search term including the partially completed information from the previous team member.
The user then poplulates the rest of the form and suibmits
xfa.sourceSet.DataConnection.update();
This is where is fall down....
On the final submission the form seems to update first record in the database not the one that is currently showing.
I am relatively new to this so it may be me doing something stupid.
Please help.