Search Results

Search found 32 results on 2 pages for 'cfquery'.

Page 1/2 | 1 2  | Next Page >

  • retreving long text (CLOB) using CFQuery

    - by CFUser
    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 exists in Oracle DB. I am using the Oracle Driver in CFadim console enabled 'Enable long text retrieval (CLOB).' and 'Enable binary large object retrieval (BLOB). ' set 'Long Text Buffer (chr)' and 'Blob Buffer(bytes) ' values to 6400000 any suggestions to retrieve the full text?

    Read the article

  • Using cachedwithin attibute inside cfquery

    - by Jason
    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 does it use some better logic to decide if it is the same query? Also, if there is a variable in your query does the cache take into account the value of the variable?

    Read the article

  • Query Results Differ In SQL Mgmt and CFQuery

    - by E-Madd
    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 results expected are returned from SQL Mgmt Studio, but nothing is returned from CFQuery. WTF!?

    Read the article

  • ColdFusion's cfquery failing silently

    - by johnthexiii
    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 ---> I can successfully retrieve the data with python's cx_Oracle and using sys.getsizeof on the python list returns 22621060, so about 21 megabytes. ColdFusion does not return an error on the page, and I can't find anything in any of the logs. Why is cfdump not showing the number of rows? Additional Information The reason for doing it this way is because I have about 8000 smaller queries to run against the randomthing query. In other words when I run those 8000 queries against the database it takes hours for that process to complete. I suspect this is because I am competing with several other database users, and the database is getting bogged down. The 8000 smaller queries are getting counts of col1 over a period of col2. SELECT count(col1) as count WHERE col2 < 20121109 AND col2 > 20121108 According to Adam Cameron's suggestions. cflog is suggesting that the query isn't finishing. I tried changing the queries timeout both in the code and in the CFIDE/administrator, apparently CF9 no long respects the timeout attribute, regardless of what I tried I couldn't get the query to timeout. I also started playing around with the maxrows attribute to see if I could discern any information that way. when maxrows is set to 1300000 everything works fine when maxrows is 1400000 or greater I get this error when maxrows is 2000000 I observe my original problem Update So this isn't a limit of cfquery. By using QueryNew then looping over it to add data and I can get well past the 2 million mark without any problems. I also created a ThinClient datasource using the information in this question, I didn't observe any change in behavior. The messages on the database end are SQL*Net message from client and SQL*Net more data to client I just discovered that by using the thin client along with blockfactor1="100" I can retrieve more rows (appx. 3000000).

    Read the article

  • CFQuery where param

    - by proyb2
    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" required="true" /> <cfargument name="gridsortcolumn" required="true" /> <cfargument name="gridsortdirection" required="true" /> <cfargument name="getSearchString" default="" /> <cfif arguments.gridsortcolumn eq ""> <cfset arguments.gridsortcolumn = "parkName" /> <cfset arguments.gridsortdirection = "asc" /> </cfif> <cfquery name="parks" datasource="cfdocexamples"> select parkName, parkType, city, state from parks where <cfqueryPARAM value = "#getSearchString#" CFSQLType = "CF_SQL_VARCHAR"> order by #arguments.gridsortcolumn# #arguments.gridsortdirection# </cfquery> <cfreturn queryconvertforgrid(parks, page, pagesize) />

    Read the article

  • Looping over a Cfquery or a Struct ?

    - by Somu
    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 query everytime in each div to check the condition is the rirht approach ? <tr > features: #getAttributes.seat# Disclosures: #getTicketAttributes.seat#

    Read the article

  • Combining query rows in a loop

    - by icemanind
    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 returns rows of data, depending on what the parameter is. What I am trying to do is combine the queries into one query object. In other words, if it loops 3 times and each loop returns 4 rows, I want a query object that has all 12 rows in one object. How do I acheive this?

    Read the article

  • Is it possible to rebind sql paramters using the result from a cfquery?

    - by Larry
    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> <cfoutput> #queryResult.sql# <br /> #ArrayToList(queryResult.sqlparameters)# </cfoutput> It outputs: SELECT id FROM events WHERE category_id = ? OR title like ? 1,%test% I need the actual string "SELECT id FROM events WHERE category_id = 1 OR title like '%test%'". Is there a way to rebind the parameters to the sql?

    Read the article

  • can't define id ( cold fusion )

    - by venom
    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 code should have defined the brand_id, but instead shows 1. The system is Workcube. Here is my example for getting from the static product's id, its dynamic price: Example 2: <cfset product_id = 630> <cfquery name="price_standart" datasource="#dsn3#"> SELECT PRICE_STANDART.PRICE PRICE FROM PRICE_STANDART WHERE PRICE_STANDART.PRODUCT_ID = <cfqueryparam value="#product_id#" cfsqltype="cf_sql_integer"> </cfquery> But this time i need to get from dynamic product's ID its dynamic brand id. This script works the same way as the Example 1: <cfquery name="GET_BRAND" datasource="#dsn1#"> SELECT BRAND_ID FROM PRODUCT_BRANDS WHERE BRAND_ID = BRAND_ID </cfquery> #get_brand.BRAND_ID#

    Read the article

  • Passing the form scope to a Remote cfc

    - by cf_PhillipSenn
    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> <cfquery datasource="#Variables.Datasource#"> UPDATE Person SET FirstName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.FirstName#"> ,LastName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.LastName#"> WHERE PersonID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.PersonID#"> </cfquery> <cfset local.result = arguments.PersonID> <cfelse> <cfquery name="local.qry" datasource="#Variables.Datasource#"> INSERT INTO Person(FirstName,LastName) VALUES( <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.FirstName#"> ,<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.LastName#"> ); SELECT PersonID FROM Person WHERE PersonID=Scope_Identity() </cfquery> <cfset local.result = local.qry.PersonID> </cfif> <cfreturn local.result> </cffunction> </cfcomponent> I need to pass in form.PersonID, form.firstname, form.lastname.

    Read the article

  • Difficulty creating a paging function with MySQL and ColdFusion

    - by Mel
    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 does not paginate, but it displays the result search results using a CFC: <!---DEFINE DEFAULT STATE---> <cfparam name="variables.searchResponse" default=""> <cfparam name="URL.titleName" default=""> <cfparam name="URL.genreID" default=""> <cfparam name="URL.platformID" default=""> <!---TitleName can only be blank if one or both genre and platform are selected---> <cfif StructKeyExists(URL, "searchQuery") AND (Len(Trim(URL.titleName)) LTE 2 AND Len(URL.genreID) IS 0 AND Len(URL.platformID) IS 0)> <cfset variables.searchResponse = "invalidString"> <cfelseif StructKeyExists(URL, "searchQuery")> <cfinvoke component="gz.cfcomp.test" method="searchGames" returnvariable="resultData" argumentcollection="#URL#"> <cfset variables.searchResponse = "hasResult"> </cfif> <cfif searchResponse EQ "hasResult" AND resultData.RecordCount EQ 0> <cfset variables.searchResponse = "noResult"> </cfif> Using this logic, I can display what I need to display on the page: <cfif searchResponse EQ "invalidString"> <cfoutput>Invalid search</cfoutput> </cfif> <cfif searchResponse EQ "noResult"> <cfoutput>No results found</cfoutput> </cfif> <cfif searchResponse EQ "hasResult"> <cfoutput>Display Results</cfoutput> </cfif> If I were executing the queries on the same page, it would be easy to follow the many tutorials out there. But the queries are executing in a function. Displaying the data is easy, but paginating it has become a nightmare for me. Here is my function: <cffunction name="searchGames" access="public" output="false"> <cfargument name="titleName" required="no" type="string"> <cfargument name="genreID" required="no" type="string"> <cfargument name="platformID" required="no" type="string"> <!--- DEFINE LOCAL VARIABLES---> <cfset var resultData = ""> <!---GET DATA---> <cfquery name="resultData" datasource="myDSN"> SELECT * <!---JOINS FOR GENRE/PLATFORM GO HERE---> WHERE <!---CONDITIONS GO HERE---> </cfquery> <!---RETURN VARIABLE---> <cfreturn resultData> </cffunction> To paginate, I thought about modifying my function to the following (a new query using a count statement): <!--- DEFINE LOCAL VARIABLES---> <cfset var resultCount = ""> <!---GET DATA---> <cfquery name="resultCount" datasource="myDSN"> SELECT COUNT(gameID) AS rowsFound FROM GAMES <!---JOINS FOR GENRE/PLATFORM GO HERE---> WHERE <!---CONDITIONS GO HERE---> </cfquery> <!---RETURN VARIABLE---> <cfreturn resultCount> Then I figured if there is a result to return, I would execute a nested query and create the pagination variables: <cfif resultCount.rowsFound GTE 0> <cfparam name="pageNumber" default="1"> <cfset var recordsPerPage = 5> <cfset var numberOfPages = Int(resultCount.RecordCount / recordsPerPage)> <cfset var recordsToSkip = pageNumber * recordsPerPage - recordsPerPage> <!---DEFINE LOCAL VARIABLE---> <cfset var resultData = ""> <cfquery name="resultData" datasource="myDSN"> <!---GET DATA AND SEND IT BACK USING LIMIT WITH #recordsToSkip# and #RecordsPerPage#---> </cfquery> <!---RETURN VARIABLE---> <cfreturn resultData> </cffunction> I figured I would return two variables: resultCount and resultData. I would use #resultCount# to build my pagination, and #resultData# to display the output. The problem is I can't return two variables in the same cfinvoke tag. Any ideas of how to approach the the right way? I'm totally lost as to the logic I need to follow.

    Read the article

  • MySQL, Coldfusion, Selecting records that were timestamped in the last 24 hours.

    - by nobosh
    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 blogentry.personID = person.personID WHERE blogentry.deleted = 'N' ORDER BY blogentry.dateAdded DESC </cfquery> blogentry.dateAdded is a MySql TimeStamp Thanks

    Read the article

  • Is there a way to get each row's value from a database into an array?

    - by Guyver
    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 name="alllocations" DATASOURCE="#DS#"> SELECT locationID FROM tblProjectLocations WHERE projectID = '#ProjectName#' </CFQUERY>

    Read the article

  • Oracle Unicode problem when using NLS_CHARACTERSET is WE8ISO8859P1 and NLS_NCHAR_CHARACTERSET is AL16UTF16, and ColdFusion as programming language

    - by tsurahman
    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 9 developer edition <cfprocessingDirective pageencoding="utf-8"> <cfset setEncoding("form","utf-8")> <form action="" method="post"> Unicode : <br> <textarea name="txaUnicode" id="txaUnicode" cols="50" rows="10"></textarea> <br><br> Language : <br> <input type="Text" name="txtLanguage" id="txtLanguage"> <br><br> <input type="Submit"> </form> <cfset dsn = "theDSN"> <cfif StructKeyExists(FORM, "FIELDNAMES")> <cfquery name="qryInsert" datasource="#dsn#"> INSERT INTO UNICODE ( C_VARCHAR2, C_CHAR, C_CLOB, C_NVARCHAR2, LANGUAGE ) VALUES ( <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#FORM.TXAUNICODE#">, <cfqueryparam cfsqltype="CF_SQL_CHAR" value="#FORM.TXAUNICODE#">, <cfqueryparam cfsqltype="CF_SQL_LONGVARCHAR" value="#FORM.TXAUNICODE#">, <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#FORM.TXAUNICODE#">, <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#FORM.TXTLANGUAGE#"> ) </cfquery> </cfif> <cfquery name="qryUnicode" datasource="#dsn#"> SELECT * FROM UNICODE ORDER BY LANGUAGE </cfquery> <table border="1"> <thead> <tr> <th>LANGUAGE</th> <th>C_VARCHAR2</th> <th>C_CHAR</th> <th>C_CLOB</th> <th>C_NVARCHAR2</th> </tr> </thead> <tbody> <cfoutput query="qryUnicode"> <tr> <td>#qryUnicode.LANGUAGE#</td> <td>#qryUnicode.C_VARCHAR2#</td> <td>#qryUnicode.C_CHAR#</td> <td>#qryUnicode.C_CLOB#</td> <td>#qryUnicode.C_NVARCHAR2#</td> </tr> </cfoutput> </tbody> </table> from this guide http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10749/ch6unicode.htm#i1007297 I think for my Enterprise database it should produce same thing as XE (at least for NVARCHAR2 column) since the typical solution from that guide said: Use NCHAR and NVARCHAR2 datatypes to store Unicode characters Keep WE8ISO8859P1 as the database character set Use AL16UTF16 as the national character set So, how to make it works too in my Enterprise database? Thank you :)

    Read the article

  • How to get a dynamic attribute name in cfloop over query in ColdFusion

    - by Kip
    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: <cfquery datasource="TestSource" name="qryResult"> SELECT * FROM MyTable </cfquery> <cfloop query="qryResult"> <cfset MyAttr="autoid" /> <cfoutput> Test 1: #qryResult.autoid# <br/> <!--- succeeds ---> Test 2: #qryResult[MyAttr]# <br/> <!--- fails ---> </cfoutput> </cfloop>

    Read the article

  • JavaScript variable to ColdFusion variable

    - by Alexander
    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 my new INSERT INTO statement. BUT: the rsPick.name comes from a database with a different character set and the only way to get it right into my new database is to read it from the web page and not from the value came in the output query. So I read this value with that little JavaScript I made and put it in the myValue variable and then I want ColdFusion to read that variable in order to place it in my SQL statement. <cfoutput query="rsPick"> <tr> <td>#rsPick.ABBREVIATION#</td> <td id="square"> #rsPick.name# </td> <td>#rsPick.Composition#</td> <td> Transaction done... <script type="text/javascript"> var myvalue = document.getElementById("square").innerHTML </script> </td> <cfquery datasource="#Request.Order#"> INSERT INTO products (iniid, abbreviation, clsid, cllid, dfsid, dflid, szsid, szlid, gross, retail, netvaluebc, composition, name) VALUES ( #rsPick.ID#, '#rsPick.ABBREVIATION#', #rsPick.CLSID#, #rsPick.CLLID#, #rsPick.DFSID#, #rsPick.DFLID#, #rsPick.SZSID#, #rsPick.SZLID#, #rsPick.GROSSPRICE#, #rsPick.RETAILPRICE#, #rsPick.NETVALUEBC#, '#rsPick.COMPOSITION#','#MYVALUE#' ) </cfquery> </tr> </cfoutput>

    Read the article

  • How do I grab and use a variables coming back through ValueList from an AJAX call?

    - by Mel
    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 class="titleSearchForm" id="searchForm" action="search.cfm?GameID=#cfautosuggestvalue.GameID#" method="post"> <fieldset> <cfinput type="text" class="titleSearchField" name="TitleName" onChange="form.submit()" autosuggest="cfc:gz.cfcomp.search.AutoSuggestSearch({cfautosuggestvalue})"> <input type="button" class="titleSearchButton" value=" " /> </fieldset> </cfform> Query in CFC: <cfquery name="SearchResult" datasource="myDSN"> SELECT CONCAT(titles.TitleName, ' on ', platforms.PlatformAbbreviation) AS sResult, games.GameID FROM games Inner Join platforms ON games.PlatformID = platforms.PlatformID Inner Join titles ON titles.TitleID = games.TitleID WHERE UCase(titleName) LIKE Ucase('#ARGUMENTS.SearchString#%') ORDER BY titleName ASC; </cfquery> Two things: First of all, I would like to get the GameID back to the page making the AJAX request; I know why it is not coming back: Because I'm only returning sResult var, which does not include the GameID. Is there a way to return the GameID value without displaying it? The second thing: How to I grab a value from the auto-suggest once it is returned? Say I want to grab the GameID, or if I can't do that, the "TitleName" to use that in my query? I tried passing it to the form this way: action="search.cfm?GameID=#cfautosuggestvalue.GameID#" - but that does not work. How do I reference the autosuggestionvalue varaibles for use? Thanks

    Read the article

  • How do you make an added row from QueryAddRow() the first row of the result from a query?

    - by JS
    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() then it all works great as the last result of the query when output. However, I need it to be first row of the query but when I try to set the row attribute with the QuerySetCell it just overwrites the first returned row from my query (i.e. my QueryAddRow() replaces the first record from my query). What I currently have is setting a variable from recordCount and arranging the output but there has to be a really simple way to do this that I am just not getting. This code sets the row value to 1 but overwrites the first returned row from the query. <cfquery name="qxLookup" datasource="#application.datasource#"> SELECT xID, xName, execution FROM table </cfquery> <cfset QueryAddRow(qxLookup)/> <cfset QuerySetCell(qxLookup, "xID","0",1)/> <cfset QuerySetCell(qxLookup, "xName","Delete",1)/> <cfset QuerySetCell(qxLookup, "execution", "Select this to delete",1)/> <cfoutput query="qxLookup"> <tr> <td> <a href="##" onclick="javascript:ColdFusion.navigate('xSelect/x.cfm?xNameVar=#url.xNameVar#&xID=#qxLookup.xID#&xName=#URLEncodedFormat(qxLookup.xName)#', '#xNameVar#');ColdFusion.Window.hide('#url.window#')">#qxLookup.xName#</a> </td> <td>#qxLookup.execution#</td> </tr> </cfoutput> </table> Thanks for any help.

    Read the article

  • $.ajax ColdFusion cfc JSON Hello World

    - by cf_PhillipSenn
    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 PersonID,FirstName,LastName FROM Person </cfquery> <cfreturn local.qry> </cffunction> </cfcomponent> And using the jQuery $.ajax method, I would like to make an unordered list of everyone. <!DOCTYPE HTML> <html> <head> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1"); </script> <script type="text/javascript"> jQuery(function($){ $.ajax({ url: "Remote/Person.cfc?method=Read&ReturnFormat=json", success: function(data){ var str = '<ul>'; // This is where I need help: for (var I=0; I<data.length; I++) { str += '<li>' + I + data[I][1]+ '</li>' } str += '</ul>'; $('body').html(str); }, error: function(ErrorMsg){ console.log("Error"); } }); }); </script> </head> <body> </body> </html> The part where I'm lost is where I'm looping over the data. I prefer to the use jQuery $.ajax method because I understand that $.get and $.post don't have error trapping. I don't know how to handle JSON returned from the cfc.

    Read the article

  • Coldfusion Report Builder - How can you set different datasources externally between prod/staging/de

    - by Smooth Operator
    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 datasource of MyApp_Staging. That server also, may or may not, have the live app working under MyApp_Live. Ant pushes the update to Staging just great. Run the report, crashes and burns. Why? It seems the report is looking for the MyApp_Dev data_source, even though the application is using the MyApp_Staging datasource. In digging around I found a few approaches, I would like to do this one, final, ideal way from the beginning instead of having to go back to do dozens of reports differently when I have a new Aha! moment. 1) Obvious: Pass in the datasource in to the cfreport tag. Doesn't work for ColdFusion Builder Reports as of v8, or v9 as tested on Linux. 2) Most realistic option (but painful) so far: Pass in the query as an object into the ColdFusion Builder report. Let's think about this: Create the Report with the report builder to my heart's content using the RDS, etc on my local box. When I'm done, copy the query into a snippet of code, or into a database column to be dynamically be injected at runtime with correct datasource. Modify my "run report" event to find the query from the database column, insert it into another dynamic cfquery and potentially... evaluate (!?!) it? Fun side is I can set the cfquery datasource to what I would need for each environment. When I modify the report's columns in CF Report Builder, I always have to update the query in the database. Is there a snippet of code that can extract this for me? Hmm. 3) Less than ideal. Suck it up and let all the reports in staging run off the live server. Maybe copy the live data into staging (sans structural changes) to let it seem similar. Are there any eloquent ways to accomplish the above? Thanks in Advance!

    Read the article

  • Coldfusion Components:- The argument passed to the function is not of type numeric

    - by salim.vali
    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#" method="post" onsubmit="submitform();" > <tr><td>Username:</td> <td><input type="text" name=" Username" value="#form. Username#" ></td></tr> <tr><td>Password:</td> <td><input class="" type="password" name="password" value="#form.password#" ></td></tr> <tr><td>Rate:</td> <select name="rating" > <option value="" ></option> <cfloop query="qGetReting"> <option value="#rating_id#" <cfif form. rating eq prof_id>selected</cfif> >#rating#</option> </cfloop> </select> </td> </tr> </form> Now there is this cfc called Registr.cfc in the "forms" folder which has an insert-function called 'putNUsr'the code for 'Registr.cfc' is as follows. <cfcomponent> <cffunction name="putNUsr" returntype="void" displayname="" output="no"> <cfargument name="password" type="string" required="true"> <cfargument name="rating" type="numeric" required="true"> <cfargument name="username" type="string" required="true"> <cfquery datasource="#application.xyz#" name="q_putNUsr"> insert into users (username , password , rating) values( <cfqueryparam value="#arguments. username#" cfsqltype="CF_SQL_VARCHAR" />, <cfqueryparam value="#arguments.password#" cfsqltype="CF_SQL_VARCHAR" />, <cfqueryparam value="#arguments.rating#" cfsqltype="CF_SQL_INTEGER" ) </cfquery> </cffunction> </cfcomponent> I am able to populate the DB with the data if I do not use the form field "rating" which is numeric. Else i am getting the error as follows:- The RATING argument passed to the putNUsr function is not of type numeric. If the component name is specified as a type of this argument, it is possible that either a definition file for the component cannot be found or is not accessible. KINDLY HELP -S Vali

    Read the article

  • Why and why not Coldfusion (CFML) ?

    - by zarko.susnjar
    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 company's portfolio and seems that I can't find any real life, non development kind of arguments. Yes, cfquery and cffunction access="remote" make our lives easier, but client doesn't care too much about us, right?

    Read the article

1 2  | Next Page >