<?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 - 00000317.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-25T04:00:11</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#67595" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#58969" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#57467" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#57466" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#56922" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#42776" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#42475" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#40010" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#39696" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#38193" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#37435" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#37267" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#32013" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#67595">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#67595</link>
		<description>i've noticed that when using bind variables against views, if we re-build the views in the database and then try to access the cfm code with the bind variable queries, it throws an error. if we switch to using a straight SQL stmt, somethign like ... where column = '#var1#' it works... and then after &quot;a little while&quot; i can switch back to using the cfqueryparam and it all works fine. what **i'm guessing** is that the cached optimization info on the oracle side is no longer valid once we re-build the view, yet it must be trying to use that optimization plan anyway. later, when the optimization chache clears it works again.</description>
		<dc:creator>Jon Briccetti</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-05-30T08:20:16</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#58969">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#58969</link>
		<description>CF_SQL_TINYINT does not seem to work properly. I used CF_SQL_INT (which is not even listed in the options) and it works just fine for a tinyint datatype in an MSSQL database.</description>
		<dc:creator>The Fletch</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-01-04T14:23:23</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#57467">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#57467</link>
		<description>RE: LIKE and MS SQL with cfqueryparam&lt;br /&gt;&lt;br /&gt;To get around datatype matching with non character types, it is possible to CAST the column to varchar in the WHERE clause.  In this case, the type is CF_SQL_VARCHAR in the cfqueryparam statement.&lt;br /&gt;&lt;br /&gt;Note also that MS SQL uses the following format when dates are CAST:&lt;br /&gt;mmm  d yyyy (NOTE THERE ARE 2 [TWO!] spaces after mmm)</description>
		<dc:creator>anthony_id</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2006-12-08T14:54:21</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#57466">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#57466</link>
		<description>RE: MS SQL LIKE statement&lt;br /&gt;&lt;br /&gt;This only works if the % signs fit the datatype.  I tried using it with a date datatype and received a type-mismatch error.  This makes running a LIKE query on non *CHAR types impossible, so I've reverted to plain old text.  This isn't a security concern if type checking/validation occurs on the data before it hits the query (mine is in a CFC), but negates any performance gains from cfqueryparam.</description>
		<dc:creator>anthony_id</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2006-12-08T14:32:26</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#56922">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#56922</link>
		<description>For MSSQL, the money data type should use CF_SQL_MONEY, not CF_SQL_DECIMAL.</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2006-11-27T12:24:29</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#42776">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#42776</link>
		<description>Something that I can't see mentioned above, but that is worth noting:&lt;br /&gt;If you enter an invalid or mis-spelt cfsqltype it will not throw an error, it will simply switch to using CF_SQL_CHAR.</description>
		<dc:creator>boughtonp</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-11-29T08:20:39</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#42475">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#42475</link>
		<description>My tests show that Justin Fidler's article no longer applies when issuing nulls.  I'm able to use the 'null' attribute to override the 'value' as the documentation describes.  Further, the documentation doesn't note that any boolean value can be substituted for the 'yes|no' assignment to 'null'; for example, to only insert form fields that have been filled in, I used this:&lt;br /&gt;&lt;br /&gt;&lt;cfqueryparam value=&quot;#Trim(FORM.name)#&quot; cfsqltype=&quot;CF_SQL_VARCHAR&quot; null=&quot;#Len(Trim(FORM.name))#&quot;&gt;</description>
		<dc:creator>Oblio</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-11-18T09:57:19</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#40010">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#40010</link>
		<description>For information about using the null attribute, see the article by Justin Fidler at http://www.macromedia.com/devnet/server_archive/articles/cfqueryparam_oracle_databases.html&lt;br /&gt;&lt;br /&gt;Quoting from the article:&lt;br /&gt;&quot;There are a few things to keep in mind when using null variables. The VALUE parameter must be an empty string. By empty string, I mean two sets of double quotes with nothing in between. If you have anything else in there, even just a blank space, it can throw an error. &lt;br /&gt;&lt;br /&gt;Also, make sure to set NULL=&quot;YES&quot; or it won't set it to NULL properly. Finally, make sure to use the proper CFSQLTYPE to match the field you're setting to NULL. This may seem a bit counter-intuitive because NULL has no data type, but you may run into problems if you don't&quot;</description>
		<dc:creator>ASandstrom</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-27T07:16:16</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#39696">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#39696</link>
		<description>To perform an MS SQL 'LIKE' comparison using CFQUERYPARAM place the percent signs within the 'value' attribute:&lt;br /&gt;&lt;br /&gt;SELECT moreStuff &lt;br /&gt;FROM myTable &lt;br /&gt;WHERE stuff LIKE &lt;cfqueryparam value=&quot;%#substringToCompare#%&quot; cfsqltype=&quot;CF_SQL_VARCHAR&quot;&gt;</description>
		<dc:creator>edgriffiths</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-20T09:05:01</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#38193">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#38193</link>
		<description>In response to switchbox: A documentation bug (#60837) has been entered so that this will be corrected in the next release of ColdFusion.</description>
		<dc:creator>ASandstrom</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2005-08-01T12:58:45</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#37435">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#37435</link>
		<description>The MSSQL data type uniqueidentifier is a single token, not 2 words. The same applies to smalldatetime and smallmoney.</description>
		<dc:creator>switchbox</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-07-14T19:43:41</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#37267">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#37267</link>
		<description>ColdFusion does not require the &quot;null&quot; attribute, but if you have a numeric field that can be null, it is required to avoid a situational crash - &quot;&quot; (blank) will not be translated to NULL if you use only the &quot;value&quot; attribute even if your DBMS would accept SQL syntax that way; you have to consider the variable twice per cfqueryparam, like&lt;br /&gt;&lt;br /&gt;&lt;cfqueryparam value=&quot;#variable#&quot; null=&quot;#variable is &quot;&quot;#&quot; cfsqltype=&quot;CF_SQL_FLOAT&quot;&gt;&lt;br /&gt;&lt;br /&gt;This may depend on your DBMS.</description>
		<dc:creator>bizarrojack</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-07-12T07:54:55</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#32013">
		<title>coldfusion/7/htmldocs/00000317.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000317.htm#32013</link>
		<description>So I am told, the speed bonus comes in when a RDBMS' query optimizer can be circumvented, i.e. when the optimization plan is cached already.  When non-cfqueryparam-ed query's optimization step is trivial, you wont see an improvement, and if it is repeated exactly (including arguments) you would also not see an improvement by using cfqueryparam.  Without cfqueryparam (bind variables), queries with different arguments won't appear to be a match in the query optimizer cache lookup, and what is effectively the same query will have to go through the optimization process, basically needlessly.&lt;br /&gt;&lt;br /&gt;You can see in the cfdebug output that the SQL without cfqueryparam is like this:&lt;br /&gt;select x,y,z from table where foo = 'bar' . . .&lt;br /&gt;select x,y,z from table where foo = 'baz' . . .&lt;br /&gt;which is two entries in the optimization plan cache, whereas with cfqueryparam it will be &lt;br /&gt;select x,y,z from table where foo = ?  . . .&lt;br /&gt;both times, with the variables printed afterwards.  These are somewhat bad examples, because the optimization is trivial, and you wont be able to tell from the elapsed time whether that step was repeated or not.</description>
		<dc:creator>bizarrojack</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-04-21T08:36:38</dc:date>
	</item>
	</rdf:RDF>

