I assume you're talking about an Access database.  If so, you can just treat
the query as a regular table.

For example, if you have a query called qryMyStuff, which reads a bunch of
tables and returns a result set, you can output the results in CF like so:

<CFQUERY NAME="getStuff" DATASOURCE="{your DSN here}>
SELECT *
FROM qryMyStuff
</CFQUERY>

<CFOUTPUT QUERY="getStuff">
#getStuff.field1# #getStuff.field2#
</CFOUTPUT>

Where field1 is a field in your original query, as is field2.  The getStuff.
at the beginning of getStuff.field1 is not necessary, but it's neater.

Hope that brief description helps,
Bob


-----Original Message-----
From: Paul Sinclair [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 01, 2000 8:12 AM
To: CF-Talk
Subject: Accessing db query via Cold Fusion?


I have a db with a number of queries. Is it possible to access these queries
using CF and <cfoutput> the results? If so, a primer on the code would be
very helpful.

Thanks.

Paul Sinclair

----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to