I am using CFQuery to retrieve the CLOB field from Oracle DB. If the CLOB filed contains the Data less than ~ 8000, then I can see retrieved the value ( the o/p), however If the value in CLOB field size is more than 8000 chars, then its not retrieving the value. in <cfdump> i can see the query retrieved as 'empty String' though the value…
When you use the cachedwithin attribute in a cfquery how does it store the query in memory. Does it store it by only the name you assign to the query? For example, if on my index page I cache a query for an hour and name it getPeople will a query with the same name on a different page (or the same page for that matter) use the cached results or…
executing the following query in SQL management studio provides results, whereas it does not via cfquery...
select distinct locationid, locationname, locationaliasname
from vwLocationsWithAlias
where 1 = 0
or (LocationName = N'the' or LocationAliasName = N'the')
or (LocationName = N'the republic' or LocationAliasName = N'the republic')
The…
I am writing the cfquery inside the cfoutput tag. It can be written outside the cfoutput tag. My question here is do we have any performance issues if we write the cfquery inside the cfoutput ?
I have a query that retrieves a large amount of data.
<cfsetting requesttimeout="9999999" >
<cfquery name="randomething" datasource="ds" timeout="9999999" >
SELECT
col1,
col2
FROM
table
</cfquery>
<cfdump var="#randomething.recordCount#" /> <!---should be about 5 million rows…
In my CF component, I tried to filter data from user input (getSearchString) and run the code, I having problem with WHERE function. Can suggestion what is the correct way?
<cffunction name="getParks" access="remote" returntype="struct">
<cfargument name="page" required="true" />
<cfargument name="pageSize"…
Hi I have a query which retrieves Some data. I want to display that data considering some conditions in different div tags.
Now my question is, I am doing this by looping the query once and getting the data in three different structs and using these structs while displaying. Is this a good approach or
looping through the…
I have the following ColdFusion 9 code:
<cfloop from="1" to="#arrayLen(tagArray)#" index="i">
<cfquery name="qryGetSPFAQs" datasource="#application.datasource#">
EXEC searchFAQ '#tagArray[i]#'
</cfquery>
</cfloop>
The EXEC executes a stored procedure on the database server, which…
When I run the following code:
<cfquery name="someQuery" result="queryResult" datasource="wetakepictures">
SELECT id
FROM events
WHERE category_id = <cfqueryparam value="1" cfsqltype="cf_sql_integer">
OR title like <cfqueryparam value="%test%" cfsqltype="cf_sql_varchar">
</cfquery>
…
here is my cold fusion code:
Example1:
<cfquery name="GET_BRAND" datasource="#dsn1#">
SELECT PRODUCT_CATID
FROM PRODUCT_CAT
WHERE PRODUCT_CATID = PRODUCT_CATID
</cfquery>
#get_brand.product_catid#
But it shows all the time number 1, i just can't understand why, and how do i make it work properly, this…
What is the syntax for passing the form scope into a cfc with access="remote"?
I have:
<cfcomponent>
<cfset Variables.Datasource = "xxx">
<cffunction name="Save" access="remote">
<cfset var local = {}>
<!--- todo: try/catch --->
<cfif arguments.PersonID>
…
I'm trying to create pagination for search results using MySQL and ColdFusion. My intention is to only retrieve the queries that can be displayed on a single page, thus making the process efficient. I tried using two queries in my function, but I could not return two variables to the cfinvoke.
The following code…
With Coldfuson & MySQL - How to update the query to check for new entries that have a timestamp that occurs in the last 24 hours?
Query:
<cfquery name="caller.sel_BlogEntries" datasource="#request.db#">
SELECT blogentry.dateAdded, person.personName
FROM blogentry INNER JOIN person ON…
How do I prevent SQL injection when it comes to ColdFusion? I'm quite new to the language/framework.
Here is my example query.
<cfquery name="rsRecord" datasource="DataSource">
SELECT * FROM Table
WHERE id = #url.id#
</cfquery>
I see passing in url.id as a risk.
Say I have a query like the one below. What would be the best way to put each value into an array if I don't know how many results there will be? Normally I would do this with a loop, but I have no idea how many results there are. Would I need run another query to count the results first?
<CFQUERY…
I have 2 Oracle 10g database, XE and Enterprise
XE
Enterprise
and this are the data type I've use in the test table
and then I tried to test to insert some Unicode char from http://www.sustainablegis.com/unicode/
and the results are
XE
Enterprise
for this test, I use ColdFusion…
I'm inside a cfloop over a query. I want to get an attribute, but I won't know what that attribute will be until runtime. Using #qryResult[MyAttr]# fails with the error "Complex object types cannot be converted to simple values." What is the syntax for doing this?
Here is a simplified example:
…
I have a tricky one.
By means of a <cfoutput query="…"> I list some records in the page from a SQL Server database.
By the end of each line viewing I try to add this in to a record in a MySQL database.
As you see is simple, because I can use the exact variables from the output query in to…
I'm trying the following code to execute a search and it's not working. On the search.cfm page, the only value coming back is the value I input into the search field (even if I click an autosuggest value, it's not coming back; only the letters I actually type myself come back).
<cfform…
I am outputting a query but need to specify the first row of the result. I am adding the row with QueryAddRow() and setting the values with QuerySetCell().
I can create the row fine, I can add the content to that row fine. If I leave the argument for the row number off of QuerySetCell()…
I've simplified this example as much as I can. I have a remote function:
<cfcomponent output="false">
<cffunction name="Read" access="remote" output="false">
<cfset var local = {}>
<cfquery name="local.qry" datasource="myDatasource">
SELECT…
Coldfusion Report Builder is great.
One small issue. We use ANT+CFANT to deploy.
When we create the report, say in a datasource called MyApp_dev on a dev box.
Everything works great when the report is created.
We deploy the report to our staging server, which has a…
Hi
I have a simple form
form.cfm:-
<cfset Registr = createObject("component", "forms.Registr") />
<cfset setFoo = createObject('component','forms.Registr).putNUsr(username,password,rating) />
<form name="regFrm" action="#cgi.script_name#"…
When you speak to your colleagues or you want to convince your client to use Coldfusion for some new project and not some other technology or language they heard of before, which arguments do you use?
I'm asking because I'd like to make presentation to put in my…