LiveCycle Designer 8.0 (version 8.05.2073.1.374024)
Here is the latest way I've tried:
----- form1.#subform.Button1::click: - (FormCalc, client) ---------------------------------------
if (Len(Ltrim(Rtrim(txtAccountKey.rawValue))) > 0) then
//Change the commandType from TABLE to TEXT. TEXT is the equivalent of SQL Property
xfa.sourceSet.conServicePro.#command.query.commandType = "TEXT"
//Set the Select Node. Select in this case will be whatever the SQL Property you want.
xfa.sourceSet.conServicePro.#command.query.select.nodes.item(0).value = Concat("SELECT * FROM dbo.tblMainAccounts Where AccountKey = ", Ltrim(Rtrim(txtAccountKey.rawValue)), "")
//Reopen the Dataconnection
will produce a "Script Failed" error box containing the script above and no explination as to why it failed.