Ok, I figured out my questions, but now I have some more.
1)
I got some code of the net for connecting to a database using a dsn. My dsn I created is call testDB, as I first want to test stuff before I use it, and my coneection is called DataConnection. Ths connection just contains a sql statement that selects two entities in the database, and in the code, I am creating a new sql statement that will select the same two entities, but this time determining what to select on the conditions provided. The code I got is shown below, and the errors I got is below that :
-
var sCategoryName = xfa.resolveNode("form1.#subform[0].txtNameSurname").rawValue
-
xfa.sourceSet.DataConnection.#command.query.commandType = "text"
-
xfa.sourceSet.DataConnection.#command.query.select = concat("SELECT T_PIC, T_WORD FROM test WHERE T_USERN = ", sCategoryName, ";")
-
xfa.sourceSet.DataConnection.open()
-
xfa.sourceSet.DataConnection.first()
-
The errors I get is on line 2 and line 3, saying, respectively, during runtime when the code is being executed :
Error : accessor
'xfa.sourceSet.DataConnection.#command.query.comma ndType' is unknown
Error : accessor
'xfa.sourceSet.DataConnection.#command.query.selec t' is unknown.
What is the problem here?
2)
By using a DataBaseConnection, every single entry in the database is shown in the XML file that is being emailed to the specified recipient. How can I stop this from happening without writing an external application to remove this content and the sending this XML file to the specified recipient?
If this can't be done, what other solution can I use to solve this query?
Thanx a lot