Ask a Question related to Coldfusion Database Access, Design and Development.
-
RV Chris #1
Download a Query
I manage a database on a website using Coldfusion. Several people use this and
I want to give them the ability to get whatever data they want and download it
to their own computers so they can work with it in Excel, for example.
It would be nice if I could give them the choice of what fields to download,
but just 'dumping' an entire table would be OK. I don't even know where to
start. Any guidance would be appreciated.
Thanx
Chris
RV Chris Guest
-
Unable to download trial, download pulled?
I've tried downloading the Adobe Contribute CS3 trial version for windows for a few days now, and I've already sent a message using the Adobe... -
Download query results to Excel file
Hello, I am trying to create this reporting tool - where users can select the criteria and generate a montly report - which I wanted them to... -
Query of Queries on query New type query
In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could... -
#25471 [Opn->Bgs]: The PHP Documentation download page does not show any download
ID: 25471 Updated by: derick@php.net Reported By: mahesh dot chandrasekar at icici-infotech dot com -Status: ... -
#25471 [NEW]: The PHP Documentation download page does not show any download in Mozilla
From: mahesh dot chandrasekar at icici-infotech dot com Operating system: All PHP version: Irrelevant PHP Bug Type: *General... -
ranger #2
Re: Download a Query
simple... select 'field1, field2, field3' AS catz from that_table <cfoutput>
#catz# </cfoutput> to output specific fields, form page could select fields as
same input name which would post to query as comma deliminated list of form
fields <input type='checkbox' name='fields' value='field1'>field1 <input
type='checkbox' name='fields' value='field2'>field2 select #fields# from
that_table
ranger Guest
-
RV Chris #3
Re: Download a Query
When I try that I get an error about Complex object types cannot be converted
to simple values.
Also, I want the user to be able to download the data to a comma delimited
file on their own computers.
??
RV Chris Guest
-
philh #4
Re: Download a Query
Hi Chris, Look up CFCONTENT.
Using the CFEXAMPLES database:
<Cfquery name="getdata" datasource="sql">
select top 10 * from Customers</CFQUERY>
<cfset content="">
<cfloop index="thisfield" list="#getdata.columnlist#">
<cfset content=content&thisfield&chr(9)>
</cfloop>
<cfset content=mid(content,1,len(content)-1)&chr(13)>
<Cfoutput query="getdata">
<cfloop index="thisfield" list="#getdata.columnlist#">
<Cfset content=content&evaluate(thisfield)&chr(9)>
</cfloop>
<cfset content=mid(content,1,len(content)-1)&chr(13)>
</cfoutput>
<cfcontent type="application/vnd.ms-excel"><cfoutput>#content#</cfoutput>
philh Guest
-
zoeski80 #5
Re: Download a Query
RV Chris
Are any of your database columns variable scope names eg SERVER, URL, FORM
because that is usually what gives the error about complex data types you got
above. You might need to do a bit of a rename of columns before displaying them
*shrugs*
HTH
zoeski80 Guest



Reply With Quote

