coldfusion

ColdFusion 8 connect to remote access MDB

廉价感情. 提交于 2019-12-11 15:19:07
问题 I have an Access MDB file on a different server than my ColdFusion server, is there any way I can get ColdFusion 8 to be able to connect to it over the network? 回答1: You need file access to the other server. You can then connect to the database in the usual way. Or you can make a copy of the database and transfer it over the network to your ColdFusion server. Jet MDB's are file accessed based. You can't run them as a database server AFAIK. To do that you would need to upsize the database to

Displaying PDFs

筅森魡賤 提交于 2019-12-11 15:13:36
问题 Currently I have code that displays PNG images and comments from a database linked to each Image. I realized that I will also need to do this for PDF files. How would I edit the current code to display PDF documents instead of PNG Images? Any help would be much appreciated. Thanks, <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <cfquery datasource="AccessTest" name="qTest"> SELECT P.Account, P.Image, P

how can i insert list of ids while adding records?

这一生的挚爱 提交于 2019-12-11 14:48:58
问题 I have a list of question ids to be inserted into an answers table while adding records. <!--- answers query ---> <cfquery name="answers"> SELECT answer, rank FROM answers WHERE question_id IN (<cfqueryparam cfsqltype="cf_sql_integer" list="true" separator="," value="#qid#">) </cfquery> the qid is the list of old question id through which I am retrieving answers and then I am duplicating the same answers with newer question id. <!--- list of questionids ---> <cfset questionid = ArrayToList

how to insert single checkbox value in coldfusion code

主宰稳场 提交于 2019-12-11 14:46:00
问题 I have a single checkbox, I want that when I check the checkbox it should insert 1 else 0 in the database. How can I do that? This was earlier a radio button field which is getting converted to check box so already entry in the database is working good, I am posting my database code as well. <tr> <td class="leftFormLabelCell extrasmalltextbold" style="border- left:1px solid ##9c9c9c;" width="15%"> #mocTrans.Translate("Required template Action Item?")# </td> <td> <input type="checkbox" name=

Why don't I get a recursive infinite loop when throwing an error in the onError function?

无人久伴 提交于 2019-12-11 14:26:50
问题 In my coldfusion Application.cfc file, I define an onError function. In certain situations, I explicitly throw an exception using a cfthrow tag - e.g. <cfthrow object="#myException#"> . My question is, why doesn't this create an infinite loop? Or at least cause another call to the onError function? (Instead, it just dumps the error to the screen. Which is the functionality I want, actually :) - but I'm still confused about why this happens.) 回答1: This is expected and documented behavior: If

Why a parameter is not defined, if I can dump it and it has a value in Coldfusion?

纵然是瞬间 提交于 2019-12-11 14:07:18
问题 Just a little clueless... using Coldfusion8, if I dump my session to file: <cfdump output="D:\ColdFusion8\logs\dump.txt" var="#Session#"> this includes: accounttyp: whatever I get the same result if I only dump this parameter: <cfdump output="D:\ColdFusion8\logs\dump.txt" var="#Session.accounttyp#"> Question: If it's defined and dump-able, how come checking isDefined like so: <cfdump output="D:\ColdFusion8\logs\dump.txt" var="#IsDefined(Session.accounttyp)#"> turns out to be NO ? If it's

Remove characters in <cfoutput> with ReplaceNoCase() ColdFusion

陌路散爱 提交于 2019-12-11 13:56:39
问题 I need to display an output from a data record that is formatted similar to this: XXXX:12345 (Xxxxxxxxx) However, the only data I want to output is the "12345" and with two preceding zeros, i.e. the output should look like "0012345". The "12345" in the record is example only, each record has a unique number assigned. An example record looks like this: CAST:98765 (RPOS1234-XY) Can I use the ReplaceNoCase() to pull only that data out of the record? If so, how would I write the code to remove

$Ajax - getting coldfusion error “ ColdFusion was unable to add the text you specified to the output stream.”

Deadly 提交于 2019-12-11 13:43:29
问题 I'm stopped on a couple of pages because of this error. I'm not sure why my cfc method is returning anything to the output stream. It's the success function that is returning the error message. The database is being updated correctly. function onSelectChange(){ var selected = $("#MrMrsSelect option:selected"); if(selected.val() != 0){ //alert("You Selected " + selected.text() + "for " + SelectedInvid); $.ajax({ type: "POST", url: "cfc/basic.cfc?method=FixMrMrs", data: "indivNum=" +

Wrap fails for HTML content

寵の児 提交于 2019-12-11 13:33:16
问题 I have tried to wrap HTML CMS content, but it fails. Here the code I have tried: <h3>Wrap Example</h3> <cfset test='<h4><span>This is failure wrap function</span></h4><span><h5>This is failure wrap function</h5></span>'> <cfoutput>#Wrap(test, 10)#</cfoutput> The result is given below: Wrap Example This is failure wrap function< /span> This is failure wrap function< /h5> How can fix this issue? 回答1: As per its docs, wrap() operates on a string , not a fragment of HTML . Whilst the latter is

Multi-application Coldfusion 7 server and CFC paths

坚强是说给别人听的谎言 提交于 2019-12-11 13:29:55
问题 We have a Coldfusion server that hosts multiple applications, all in their own subfolder. Something like: /webrootfolder/applicationA /webrootfolder/applicationB Furthermore, on the development server, we have a copy of a given application per developer, each being a Subversion working copy: /webrootfolder/applicationA_dev1 /webrootfolder/applicationA_dev2 /webrootfolder/applicationA_dev3 Since we are running Coldfusion 7 (with major resistance to upgrading), I find myself stuck as I want to