Questions tagged [cfquery]

`` is the primary method of executing database queries and query-of-queries (QoQ) in ColdFusion/CFML.

<cfquery> is the primary method of executing database queries and query-of-queries (QoQ) in ColdFusion/CFML. The <cfquery> tag's more common attributes include:

  • name - The name by which the query will be referred in code.
  • datasource - The data source against which the query is to be executed. Conflicts with dbtype.
  • dbtype - Used with a value of query for query-of-queries (QoQ) and with a value of hql for ORM. Conflicts with datasource.
  • cachedwithin - The time span for which the query results should be cached. Note: ColdFusion caches queries according to the name and text of the query; if either changes, the query will not be cached.
  • maxrows - The maximum number of rows to be returned from the query. Use -1 to return all rows. Note: This does not affect caching (see cachedwithin above); if maxrows is changed on a cached query, the query will still return the number of rows returned when it was first cached.
  • timeout - The number of seconds ColdFusion should wait before timing out the query. If <cfsetting requesttimeout="*xxx*" /> is used, will override that value if the timeout specified for the query is used.

Also see:

(Please see the tag's documentation for additional attributes and their explanation.)

246 questions
-1
votes
1 answer

Quering a huge database using cfquery

Well, I am going to query a 4 GB data using a cfquery. It's gonna be pain to query the whole database as it's gonna take very long time to get the data back. I tried stored procedure when the data was 2 GB and it wasn't really fast at that time…
Jack
  • 989
  • 3
  • 13
  • 24
-2
votes
2 answers

Which is faster: CFM page full of CFQUERY calls or CFINVOKE calls?

Which would be faster and more efficient memory-wise? A CFM file containing individual CFQUERY calls A CFM file containing individual CFINVOKE calls to CFC's containing individual methods for each of those same queries I realize there are…
-2
votes
2 answers

How to execute multiple cfquery one after another in coldfusion 8?

How to execute multiple cfquery one after another. First execute and completion the first cfquery then proceed to next cfquery execution and move to another cfquery. All the below cfquery are in one single page. //--------first…
-2
votes
1 answer

How to keep white spaces while executing insert in cfquery?

Data is selected from one table and inserted into another table. This data happens to be key to first table, yet foreign key to the second table. Using cfquery, select and insert works without any issues. But when this data happens to contain more…
BS2009
  • 11
  • 2
-3
votes
1 answer

Search result that has a C and a number after the C in the Part Number Field in ColdFusion

I have a search results page that lists part numbers that engineers have to work on, but I only want part numbers displayed on the results page that have a C and then a number after the C in the part number. This is done in ColdFusion. How do I…
Andy
  • 7
  • 4
-3
votes
3 answers

Cf-script convert query result in structure with the unique key?

I have few functions in my system that should be converted from CFML to CFSCRIPT. While working on this project I run to the situation where my structure outputs more result (a lot of empty rows) than it should, even query returns only one row. Here…
espresso_coffee
  • 5,980
  • 11
  • 83
  • 193
1 2 3
16
17