Tag: Coldfusion

SSRS Server – Coldfusion With SSRS Server

Coldfusion With SSRS Server SSRS Server Integration of SSRS 2008 R2(SQL server reporting server) with coldfusion server. SQL Reporting Server Configuration(SQL server 2008 R2): By default server use window authentication. Steps for complete integration: SQL Reporting Server Configuration(SQL server 2008 R2): By default server use window authentication. When my coldfusion server and SSRS server are

Coldfusion Date Format – Compare Dates Coldfusion

Coldfusion Date Format – Compare Dates Coldfusion Coldfusion Date Format Compared two date format(mm/dd/yy) strings. I found two different values in two different cases Case 1: if("10/30/28" > "10/30/30"){ writeoutput("yes"); } else{ writeoutput("no"); } Output: Yes Case 2: if("10/30/12" > "10/30/13"){ writeoutput("yes"); } else{ writeoutput("no"); } Output: No After some search I found the solutions,

Coldfusion Setup – Install coldfusion 9 And 10 on Apache

Coldfusion Setup – Install coldfusion 9 And 10 on Apache Coldfusion Setup Install coldfusion 9 or coldfusion 10 on ubuntu. check, Is your UBUNTU ready for coldfusion development? Software should be installed: Apache server Java jdk & jre Coldfusion server Coldfusion server installation steps: C++ library(coldfusion before version 7 tag requires c++ library) : sudo apt-get

Pagination In Coldfusion – Example of Coldfusion Pagination

Pagination In Coldfusion Pagination In Coldfusion – This is simple pagination implement in ColdFusion using calculation. Find first and last record or page by page records. <cfquery name="records" datasource="demoDB"> SELECT Fname,LastName FROM campaign </cfquery> <div style="display:inline-block; position:relative; width:644px; margin-top:-30px;"> <cfif IsDefined("nmax")> <cfset max = nmax> <cfelseif IsDefined("url.max")> <cfset max = url.max> <cfelse> <cfset max =

Call cfc inside another cfc using Create Object with cfscript

call cfc function inside another cfc using create object with cfscript in coldfusion with parameters. CFC <!---One.cfc---> <cfcomponent> <cffunction name="generateRandom" output="true" access="public"> <cfargument name="srange" type="string" /> <cfargument name="Erange" type="string" /> <cfreturn RandRange(arguments.srange,arguments.Erange)> </cffunction> </cfcomponent> <!---Two.cfc---> <cfcomponent> <cfset OneCFCComponent = createObject("component", "one") /> <cffunction name="TwoCFCFunction" access="remote" returntype="any"> <cfargument name="Start" required="yes" type="string"> <cfargument name="End" required="no" type="string"> <cfset

Nexmo Voicemail Integration With Coldfusion cfhttp

Nexmo Voicemail Integration With Coldfusion. First Call XML Nexmo API https://rest.nexmo.com/call/xml using Coldfusion cfhttp Nexmo Voicemail Integration With Coldfusion, Call XML API using cfhttp. <cfhttp url="https://rest.nexmo.com/call/xml" method="post" result="myData"> <cfhttpparam type="formfield" name="api_key" value="xxxxxx" > <cfhttpparam type="formfield" name="api_secret" value="xxxxxx"> <cfhttpparam type="formfield" name="to" value="918800xxxxxx"> <cfhttpparam type="formfield" name="machine_detection" value="true"> <cfhttpparam type="URL" name="answer_url" value="http://www.xxxx.com/nexmo/Voicemail.xml"> <cfhttpparam type="formfield" name="status_url" value="http://www.xxxx.com/nexmo/status.cfm"> <cfhttpparam type="formfield"

Create CSV File By Calling Coldfusion function With CreateObjet

Create CSV File by calling cffunction using createObject, append, java.lang.StringBuffer, deserializejson, cfheader, Content-Disposition and cfcontent. Create CSV File By Calling Coldfusion function <cfset CFCObject = createObject("component", "one") /> <cfset csvstr = createObject("java","java.lang.StringBuffer")> <cfset csvstr.append("FirstName,LastName,Registered Date" & Chr(13) & Chr(10) )> <cfset arrayData = deserializejson(CFCObject.getUsersDetails()).aaData> <cfloop index = "arrayIndex" array = "#arrayData#"> <cfset csvstr.append(arrayIndex[1] & ",")>

HTMLCodeFormat and HTMLEditFormat- Difference

HTMLCodeFormat and HTMLEditFormat HTMLCodeFormat(): HTMLCodeFormat Inserts opening pre and closing pre tag at the beginning and end of the string. HTMLEditFormat(): HTMLEditFormat do not inserts opening pre and closing pre tag at the beginning and end of the string. NOTE: 1. Both convert characters with special meanings in HTML to HTML character entities such as

cachedAfter AND cachedwithin Difference – Cache Query Results

cachedAfter AND cachedwithin cachedAfter: cache query results till the supplied date, after supplied date ColdFusion uses cached query data. When specifying a date value as a string, enclose it in quotation marks. cachedwithin: cache query results till the time span, after time span ColdFusion re-run query. cachedWithin attribute is used conjunction with the CreateTimeSpan function.

CSV File Coldfusion – Read CSV File and insert into database

CSV File Coldfusion – Read CSV File and insert into database after skip header row using cffile and cfloop coldfusion tags. CSV File Coldfusion <cfset filePath = expandPath("./ExportFiles/")> <cffile action="read" file="#filePath#users.csv" variable="csvfile"> <!---Start: loop through the CSV file on line breaks---> <cfset skipRow = 0 > <cfloop index="index" list="#csvfile#" delimiters="#chr(10)##chr(13)#"> <cfif skipRow NEQ 0> <!---Skip

Amcharts Json for dataProvider using coldfusion cfc

Amcharts Json for dataProvider using coldfusion cfc when you create amcharts with ajax request Amcharts Json for dataProvider using coldfusion <cfquery name="GetStatus" datasource="DemoDB" timeout="60"> SELECT COUNT(*) as TOTAL, CASE WHEN responsemsg = 'acked' THEN 'Delivered' WHEN responsemsg = 'process' THEN 'Sent' ELSE responsemsg END AS msgstatus FROM userResponse WHERE created_dt BETWEEN '#sdate#' and '#eDate#' GROUP

SMIL – Synchronized Multimedia Integration Language

SMIL – This is an example, how can read .smil file using coldfusion and also check smil data file exists on server. SMIL (Synchronized Multimedia Integration Language) <cfset FileURL = "https://test.com/userdata/0.smil"> <CFSET URLPath = Replace(FileURL,"/#ListLast(FileURL,'/')#","")> <!---Call .smil file using cfhttp---> <cfhttp method="get" url="#FileURL#" result="data"></cfhttp> <cfset srcValue = "#ListGetAt(data.Filecontent,listContains(data.Filecontent,'src',' '),' ')#"> <cfset tempFileName = "#replace(replace(srcValue,'src=',''),"""", '',

Upload Multiple Selected Files in Coldfusion

Upload Multiple Selected Files using HTML5 input field that select multiple files to upload and coldfusion uploadall file action. select multiple files using HTML5 input field <form name="imageForm" action="new.cfm" method="post" enctype="multipart/form-data"> <input type="file" name="image" multiple="multiple" accept="image/jpeg, image/gif, image/png, application/zip" /><br /> <input type="submit" name="submit" value="Submit" /> </form> Upload Multiple Selected Files – Ccoldfusion <cfset uploadPath=

Create text image center using coldfusion imageDrawText

Create text image center using imageSetDrawingColor, imageDrawText, imageNew, writeToBrowser, coldfusion, structNew. Create text image center – Coldfusion <cfset text = "P"> <cfset imageWidth = 100 /> <cfset imageHeight = 100 /> <cfset txtWidth = 30 /> <cfset txtHeight = txtWidth /> <cfset textImg = imageNew("",imageWidth,imageHeight,"rgb","red")> <cfset x=max(textImg.width,textImg.height)> <cfset newheight=textImg.height*txtHeight/x> <cfset newwidth=textImg.width*txtWidth/x> <cfset newx = (textImg.width/2

Autocomplete Textbox Jquery with Database Coldfusion

Autocomplete Textbox Jquery with Database Coldfusion using cfcomponent, coldfusion, StructNew ,cffunction, ArrayAppend, mysql, cfqueryparam, Jquery, Jquery Autocomplete. Autocomplete Textbox Jquery/HTML <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <cfform name="actoComp"> <table border="0" cellpadding="0" cellspacing="10"> <tr> <td>Account No<br> <cfinput type="text" name="accountNo" id="accountNo"> </td> <td><br><input type="submit" name="Submit" value="SUBMIT"></td> </tr> </table> </cfform> <script> $(document).ready(function() { $( "#accountNo" ).autocomplete({

Web Service – Create And Call Web Service In Coldfusion

Create Web Service : Create a coldfusion component function with access “remote” and call webservice using cfscript with arguments, cfobject with arguments, cfhttp with arguments, cfinvoke with arguments. Create Web Service componentCFC.cfc <cfcomponent> <cffunction name="webServiceCFCFunction" access="remote" returntype="string" output="no"> <cfargument name="userName" type="string" required="yes"> <cfreturn "Welcome Mr. " & userName> </cffunction> </cfcomponent> Coldfusion have may diffrent ways

Get Last Insert Id From Database Table Using Coldfusion

Get Last Insert Id From MSSQL, Oracle, Sybase, Informix and MySQL Table Using Coldfusion with identifycol, rowid, sys_identity, serial_col, generated_key, @@identity, SCOPE_IDENTITY() Get Last Insert Id From Database Table Using Coldfusion <cfquery name="insertDatabase" datasource="MyDSN" result="queryResult"> INSERT INTO employee ( FName, LName ) VALUES ( 'sql', 'server' ) </cfquery> <cfoutput> #queryResult.GENERATED_KEY# - From MySQL #queryResult.identifycol# -

Create Coldfusion Database DSN Programmatically

Create Coldfusion Database DSN programmatically using structNew(), createObject(), component, setMySQL5(), verifyDSN(). Create Coldfusion Database DSN Programmatically <!---Login to administrator ---> <cfset adminAPI = createObject( 'component', 'cfide.adminapi.administrator' ) /> <cfset adminAPI.login( 'YourPassword' ) /> <cfset dsnName = "myTestDSN"> <cfscript> dsnAPI = createObject( 'component', 'cfide.adminapi.datasource' ); dsnStructure = structNew(); dsnStructure.driver = "mysql5"; dsnStructure.name="#dsnName#"; dsnStructure.host = "127.0.0.1"; dsnStructure.port