-
Notifications
You must be signed in to change notification settings - Fork 0
/
resultsWDDX.cfm
30 lines (22 loc) · 1.25 KB
/
resultsWDDX.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<cfif NOT structKeyExists(url,"id")>
Sorry, your query did not have any records. Return to the qbrowser page and run another query.
<cfabort />
</cfif>
<cflock name="resultsxml" timeout="30" type="exclusive">
<cfsilent>
<cfset variables.arResults = session.resultsHandler.getRecordsetForID(url.id) />
<cfset variables.q = variables.arResults[2] />
<cfset variables.recordsetID = variables.arResults[1] />
<cfset variables.ts = variables.arResults[3] />
<!--- <cfset variables.arResultsHeaders = ListToArray(variables.q.columnlist) /> --->
<cfset variables.arResultsHeaders = variables.q.getColumnNames() />
</cfsilent>
<cfif fileExists(expandPath('resultsWDDX.xml'))>
<cffile action="delete" file="#expandPath('data/temp/resultsWDDX.xml')#" />
</cfif>
<cffile action="write" file="#expandPath('data/temp/resultsWDDX.xml')#" output="" addnewline="no"/>
<cfwddx action="cfml2wddx" input="#variables.q#" output="variables.out" />
<cffile action="write" file="#expandPath('data/temp/resultsWDDX.xml')#" output="#variables.out#" addnewline="no"/>
</cflock>
<cfheader name="Content-Disposition" value="attachment; filename=resultsWDDX.xml">
<cfcontent type="text/xml" file="#expandPath('data/temp/resultsWDDX.xml')#">