cfqueryparam

Is there a solution to this cfqueryparam memory leak?

馋奶兔 提交于 2019-12-04 12:59:58
Updates: I have submitted the bug to Adobe and referenced this SO question In my real-world code where the problem occurred I decided to just remove my use of cfqueryparam. I am now using a custom function to format the param based on type. There are security and speed concerns that I will have to deal with but it gets the particular process working acceptably under current load. In the future I am planning on going to process that pulls the data files into temporary tables in the database. I'll then perform operations on the data and transfer data to live tables using SQL as much as possible,

What is the most appropriate Coldfusion cfsqltype to use for MS SQL's uniqueidentifier field type?

痞子三分冷 提交于 2019-12-01 21:49:40
When connecting from Coldfusion 8 to a MS SQL 2008 datasource, what Coldfusion cfsqltype should I use for a SQL column set to 'uniqueidentifier'. <cfquery name="user" datasource="#ds#"> SELECT id, username FROM users WHERE id = <cfqueryparam cfsqltype="WHAT_CF_SQL_TYPE_HERE?" value="#arguments.id#"> </cfquery> Thanks! CF_SQL_CHAR or CF_SQL_IDSTAMP see: http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_18.html 来源: https://stackoverflow.com/questions/1949884/what-is-the-most-appropriate-coldfusion-cfsqltype-to-use-for-ms-sqls-uniqueiden

ColdFusion 9: int and type=“numeric” nasty bug?

允我心安 提交于 2019-12-01 02:04:07
I've just experienced a behaviour that defies any logic and could potentially lead to serious issues and was wondering if it was a bug or if the behaviour was itended and what are the best practices to circumvent the issue? If it's a bug, is there a patch? Here's the two wierd behaviours that when put together are a threat to any system's data integrity. int('1 2') -> 41276 isValid('numeric', '1 2') -> true Why? Well let's see... <cffunction name="deleteSomething" access="public" returntype="void"> <cfargument name="somethingId" type="numeric" required="yes"> <cfquery datasource="#dsn()#">

Select IN on more than 2100 values

守給你的承諾、 提交于 2019-11-28 02:19:14
How can you do a select in on more than 2100 values? <cfquery name="result.qryData"> SELECT sub_acct_no, ... FROM dbo.Closed_ORDER WHERE ord_no IN <cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qryOrd.ord_no)#" list="yes"> </cfquery> Because of the ways that the tables are setup, linked Servers and JOINS are not an option. When this is ran an error this thrown because there are new many fields being passed in. First load the values into XML <cfset var strResult = '<ul class="xoxo">'> <cfloop query="qryOrd"> <cfset strResult &= '<li>#xmlformat(ord_no)#</li>'> </cfloop> <cfset

How can <cfqueryparam> affect performance for constants and null values?

喜欢而已 提交于 2019-11-28 01:27:41
Consider the following: <cfquery name="aQuery" datasource="#aSource#"> SELECT aColumn FROM aTable WHERE bColumn = <cfqueryparam value="#aVariable#" cfsqltype="#aSqlType#" /> AND cColumn = 'someConstant' AND dColumn is null </cfquery> If I change AND cColumn = 'someConstant' to AND cColumn = <cfqueryparam value="someConstant" cfsqltype="#aSqlType#" /> Is there a potential performance improvement? Is there potential to hurt performance? What if I do the same (use cfqueryparam) with AND dColumn is null ? My findings have been inconclusive. If it's important, assume ColdFusion9 and Oracle db 11g.

How can <cfqueryparam> affect performance for constants and null values?

筅森魡賤 提交于 2019-11-27 04:47:36
问题 Consider the following: <cfquery name="aQuery" datasource="#aSource#"> SELECT aColumn FROM aTable WHERE bColumn = <cfqueryparam value="#aVariable#" cfsqltype="#aSqlType#" /> AND cColumn = 'someConstant' AND dColumn is null </cfquery> If I change AND cColumn = 'someConstant' to AND cColumn = <cfqueryparam value="someConstant" cfsqltype="#aSqlType#" /> Is there a potential performance improvement? Is there potential to hurt performance? What if I do the same (use cfqueryparam) with AND dColumn

Slow query with cfqueryparam searching on indexed column containing hashes

可紊 提交于 2019-11-26 22:26:49
问题 I have the following query that runs in 16ms - 30ms. <cfquery name="local.test1" datasource="imagecdn"> SELECT hash FROM jobs WHERE hash in( 'EBDA95630915EB80709C69089315399B', '3617B8E6CF0C62ECBD3C48DDF8585466', 'D519A38F09FDA868A2FEF1C55C9FEE76', '135F94C3774F7719CFF8FF3A275D2D05', 'D58FAE69C559273D8427673A08193789', '2BD7276F209768F2FCA6635659D7922A', 'B1E3CFBFCCFF6F5B48A849A050E6D424', '2288F5B8A797F5302E8CA24323617236', '8951883E36B5D38A4643DFAA0396BF13',