To make a call to the database all of the information about that connection is stored in a structure called sourceSet. To be able to pass the filename into the SQL statement you must programatically adjust these parameters. Usually we set the data conection to be delayed open (so we can set the values) then open th econnection ourselves. Note you shoudl also close the connection when you are finished. Here is an example of how to access the parameters:
//set up sql call to DB to get specifics about employee
//Set the sourceSet to accept SQL commands
xfa.sourceSet.DataConnection.nodes.item(1).query.setAttribute("text", "commandType");
//set the SQL that you want to execute
xfa.sourceSet.DataConnection.nodes.item(1).query.select.nodes.item(0).value = "Select * from employees where EmpID = '" + EmpID.rawValue + "'";
//app.alert(xfa.sourceSet.DataConnection.nodes.item(1).query.select.nodes.item(0).value);
//now connect to DB and get a record
xfa.sourceSet.DataConnection.open()