<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - coldfusion - 7 - htmldocs - 00000316.htm</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T03:33:14</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#75197" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#69332" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#64159" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#54203" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#50676" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#43633" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#41768" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#38913" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#38893" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#30079" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#27795" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#27602" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#75197">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#75197</link>
		<description>It may also be useful to note that when setting up a query dynamically, using the code &quot;ArrayToList(userQuery.getColumnList())&quot; can be a little tricky. &lt;br /&gt;&lt;br /&gt;I have the following code that I am using to build a dynamic query. If I use 2 tables that have a field with the same name I will only have the data in the field from the first table repeated 2 times. Here is the code:&lt;br /&gt;&lt;br /&gt;Here I declare the columns:&lt;br /&gt;&lt;cfset colList = ArrayToList(userQuery.getColumnList())&gt;&lt;br /&gt;&lt;br /&gt;Here I loop through the columns to print the data:&lt;br /&gt;&lt;cfloop list=&quot;#colList#&quot; index=&quot;i&quot;&gt;&lt;br /&gt;     &lt;cfgridcolumn name=&quot;#i#&quot; header=&quot;#i#&quot; headeralign=&quot;left&quot; dataalign=&quot;left&quot; bold=&quot;yes&quot; italic=&quot;no&quot; select=&quot;yes&quot; display=&quot;yes&quot; headerbold=&quot;no&quot; headeritalic=&quot;yes&quot;&gt;&lt;br /&gt;&lt;/cfloop&gt;&lt;br /&gt;&lt;br /&gt;If I write the sql &quot;select a.name, b.name from schema1.table1 a, schema1.table2 b&quot; I will only get the data for a.name twice.&lt;br /&gt;&lt;br /&gt;Has anyone found a solution for this?</description>
		<dc:creator>Joe1982</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-10-18T11:08:26</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#69332">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#69332</link>
		<description>The comment in Dec 2005 about cfquery only creates a query object for select statements is not completely true.&lt;br /&gt;&lt;br /&gt;If the statment you run returns a recordset, it will create a query object.  The database does not return a recordset for most insert/updates, but you could for example:  add an on insert trigger that runs &quot;select @@identity as ID&quot; which returns the primary key value in an identity column.  You could now name your cfquery that runs the insert statement, it will have one row, one field, ID with the new record ID just inserted.</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-07-01T14:38:08</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#64159">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#64159</link>
		<description>Docs above say &quot;Setting this value to 0 disables query caching&quot;, but isn't it true instead that setting to 0 means &quot;unlimited query caching&quot;? That's what's been documented here (http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19406) for CF 6, 6.1. My testing shows it still so in 7.02. If so, besides changing the above, It would seem helpful for that document to be udpated to reflect that it's still true.&lt;br /&gt;&lt;br /&gt;It also seems that this should be corrected, really, to offer &quot;disable&quot; and &quot;unlimited&quot; buttons instead, to make intended behavor clear. Then 0 should be interpreted instead as disabled.&lt;br /&gt;&lt;br /&gt;The potential negative impact of this current behavior is substantial, for those who think that setting to 0 is preventing any caching, where in fact code on the server uses the caching attributes, and therefore could be using large amounts of memory (with no easy means to detect that).</description>
		<dc:creator>carehart</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-03-13T22:57:17</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#54203">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#54203</link>
		<description>How to get ColumnList from a query resultset ?&lt;br /&gt;&lt;br /&gt;&lt;cfquery name=&quot;myQuery&quot; datasource=&quot;yourDataSourceName&quot; result=&quot;myResult&quot;&gt;&lt;br /&gt;select * from tableName&lt;br /&gt;&lt;/cfquery&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfoutput&gt;&lt;br /&gt;#myQuery.ColumnList#&lt;br&gt;&lt;br /&gt;#myResult.ColumnList#&lt;br /&gt;&lt;/cfoutput&gt;&lt;br /&gt;This will give the column names in alphabetical order.&lt;br /&gt;&lt;br /&gt;But to get the column names in the same order as in database tables, use this:&lt;br /&gt;&lt;cfoutput&gt;&lt;br /&gt;#ArrayToList(myQuery.getColumnList())#&lt;br /&gt;&lt;/cfoutput&gt;</description>
		<dc:creator>Sankalan</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2006-10-11T12:38:52</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#50676">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#50676</link>
		<description>It should be noted here that cachedWithin behavior has changed.&lt;br /&gt;Using cachedWithin on a non-select query makes no sense but it did not throw an exception until version 7.02.  (This has come up on the forums a few times now.)</description>
		<dc:creator>MikerRoo</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2006-07-11T13:55:14</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#43633">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#43633</link>
		<description>It should be stated that cfquery only creates a query object for select statements. For insert, update and delete statements, no query object is created and a variable named with the query name is undefined.</description>
		<dc:creator>105</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-12-27T22:47:25</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#41768">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#41768</link>
		<description>When performing date comparisons in QoQs, CFMX7 lets you do e.g. &lt;br /&gt;where myDate &lt;= #createodbcdatetime(now())#&lt;br /&gt;&lt;br /&gt;In CFMX6 you will need to use bound params, e.g.&lt;br /&gt;where myDate &lt;= &lt;cfqueryparam cfsqltype=&quot;cf_sql_date&quot; value=&quot;#now()#&quot;&gt;</description>
		<dc:creator>funkdancer</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-11-02T04:47:31</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#38913">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#38913</link>
		<description>In response to wyntermoonwolf:&lt;br /&gt;Actually, it should read:&lt;br /&gt;result_name.recordcount - Number of records (rows) returned from the query.</description>
		<dc:creator>ASandstrom</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-08-24T09:47:23</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#38893">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#38893</link>
		<description>result_name.recordcount - Current row of query that cfoutput is processing.&lt;br /&gt; &lt;br /&gt;It should read: result_name.CurrentRow</description>
		<dc:creator>wyntermoonwolf</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-08-23T13:38:06</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#30079">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#30079</link>
		<description>&lt;!---&lt;br /&gt;This code works in CF5 with the proper Data OK message.&lt;br /&gt;It does not work on MX7 using an oracle jdbc or native driver. &lt;br /&gt;If you look at the debug of the insert statement you will see it &lt;br /&gt;is not escaped correctly. CF is suppossed to escape it automatically.&lt;br /&gt;---&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfset dsn=&quot;testdsn&quot;&gt;&lt;br /&gt;&lt;cfset mydata=&quot;'' '&quot;&gt; &lt;!--- if you put a character between the first 2 single quotes it will work in MX7 ???? ---&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfquery name=&quot;selectdata&quot; datasource=&quot;#dsn#&quot;&gt;&lt;br /&gt;      truncate table temp_table&lt;br /&gt;&lt;/cfquery&gt;&lt;br /&gt; &lt;br /&gt;&lt;cfquery name=&quot;inserttest&quot; datasource=&quot;#dsn#&quot;&gt;&lt;br /&gt;      insert into temp_table&lt;br /&gt;      (testdata)&lt;br /&gt;      values&lt;br /&gt;      ('#mydata#')&lt;br /&gt;&lt;/cfquery&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfquery name=&quot;selectdata&quot; datasource=&quot;#dsn#&quot;&gt;&lt;br /&gt;      select testdata&lt;br /&gt;      from temp_table&lt;br /&gt;&lt;/cfquery&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfoutput&gt;&lt;br /&gt;	&lt;cfif selectdata.testdata neq mydata&gt;&lt;br /&gt;	   ERROR: DB data #selectdata.testdata# does not match original #mydata#&lt;br /&gt;	&lt;cfelse&gt;&lt;br /&gt;	   Data OK.   &lt;br /&gt;	&lt;/cfif&gt;&lt;br /&gt;&lt;/cfoutput&gt;</description>
		<dc:creator>Gregd66</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-03-17T10:58:55</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#27795">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#27795</link>
		<description>In the chart outlining resultset extended variables, the text claims that result_name.recordcount is the current row of the query that's being processed by cfoutput. And, nobody is claiming to represent the total number of rows returned in the query object.&lt;br /&gt;&lt;br /&gt;Just thought you'd like to know...&lt;br /&gt;&lt;br /&gt;J</description>
		<dc:creator>cf.Objective</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-02-12T09:06:28</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#27602">
		<title>coldfusion/7/htmldocs/00000316.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000316.htm#27602</link>
		<description>docbug: the result = &quot;result_name&quot; should be before the greater than (&gt;) symbol</description>
		<dc:creator>rvoosten</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-02-09T00:17:15</dc:date>
	</item>
	</rdf:RDF>

