Description:
Call a script file and return the first result set.
Syntax:
call(spl,arg1,…)
Note:
The function calls script file .dfx/.splx while passing in the parameter arg1,…, returns the first value that dfx returns, and ends the invocation. It is a non-cellset function and so can be used outside the cellset. The function will automatically use the @s option to search for the .dfx/.splx among the file names with non-absolute paths in a specified order: Class path -> Search path -> Main path. The default main path is the current path.
When calling the call function, parameters arg1,... will be assigned to .dfx/.splx’s parameters in order, which is irrelevant to the parameter names in .dfx/.splx’s parameter list.
Parameter:
spl |
A script file .dfx/.splx |
arg1,… |
Parameters |
Option:
@r |
Disable the default buffer call |
Example:
Below are the contents of script file C:\\test.dfx where arg1 is the cellset parameter:
|
A |
1 |
=connect("demo").query("select * from Students1 where Age>?",arg1) |
2 |
return A1 |
|
A |
|
1 |
=call("C:\\test.dfx",15) |
Call the script file, and return the first returned value. Query the data of students who are above 15 years old |
Note:
Use the comma to separate the multiple results returned. E.g. return A1,B2.