Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all 5794 articles
Browse latest View live

CSV import data into SQL

$
0
0

Could anybody tell me if there are any built in functions within CF2016 that would assist in importing a CSV file into SQL?

 

At the moment I'm downloading a ZIP file from a data provider, taking the CSV out of it, putting it into Access, importing the Access into SQL, what a pain! It's time to automate it all!


Calculate the number of hours between two dates and exclude Saturday and Sunday using DateDiff?

$
0
0

Hi,

 

I have to calculate the number of hours between two dates and exclude Saturday and Sunday. The first 24 hours (Monday, Tuesday, Wednesday, Thursday or Friday) of the calculation is a grace period. After the first 24 hours, is the calculation for over of compliance.

 

For example:

 

Notified: 2019-02-03 08:58:00.0000000  (is a Sunday)

Entered: 2019-02-05 08:38:00.0000000  (is a Tuesday)

 

Since 2/3/2019 is a Sunday, the time shouldn’t start counting until 2/4 at 00:01. There’s then the 24 hour grace period, so it becomes out of compliance on 2/5/2019 at 00:02. It should only be 9 hours out of compliance.

 

The query in The SQL runs fine for Monday - Friday. It's not excluding Saturday and Sunday.

Below is the SQL code for the number of hours:

 

DATEDIFF(hour,CAST(tbla.NOTIFYDATE AS DATETIME) +

  CAST(Coalesce(tbla.NOTIFYTIME,'23:59:00') AS DATETIME),

  CAST(tbla.ENTRYDATE AS DATETIME) +

  CAST(Coalesce(tbla.ENTRYTIME,'23:59:00') AS DATETIME)) - ( (DATEDIFF(wk, tbla.NOTIFYDATE,

  tbla.ENTRYDATE) * 2)-(CASE WHEN DATENAME(dw, tbla.NOTIFYDATE) = 'Sunday' THEN 1 ELSE 0 END)-

  (CASE WHEN DATENAME(dw, tbla.ENTRYDATE) = 'Saturday' THEN 1 ELSE 0 END)) * 24 - 24 AS timelyOOCHours

 

Is there a way to perform the calculation in Cold Fusion 2016?

Can DateDiff do this? If so, is there an example?

Bindings after Upgrade

$
0
0

Hi. We are experiencing some binding issues in several forms after upgrading to CF 2016 from CF 10. All work fine in 10 but not in 2016. Are their new setting I should be looking at?

 

Thanks in advance. Any help is appreciated.

Auto-Lockdown never completes

$
0
0

Good Morning,

 

I spent all of last friday trying to figure out why the ColdFusion 2018 Auto-Lockdown will not complete.

 

We successfully migrated from CF10 to CF2018 on our test site as well as our production system. No errors on install or in the code analyst.

 

But when I tried to run auto-lockdown, I received the error "windows error 2 java vm". I installed an older version of Java and created the specified path in "Path" in the Environment Variables. It will NOW start and I am able to input all of the information it asks for.

 

But now auto-lockdown gets to one point every time and just stalls. In the CF2018 auto-lock down window it stalls on " Installing... Coldfusion Lockdown".

 

In the ColdFusion log file it shows that it tried to delete a file, the file exists, and then Deletion of file successful.

 

Then nothing.

 

Any help would be greatly appriciated.

 

Thanks,

Rob

ColudFusion Mx application

$
0
0

Hi Community,

 

To start with I'm very new to the ColudFusion applications and development.

 

We have an old coldFusion Mx application hosted on IIS server. It is production application.

 

Now, we are in planing to change the application url, however we are not sure where to change the configurations so that application functionalities work seamlessly with the new url.

 

any help is highly appreciated.

 

Thank you,

Regards,

Venky

After Coldfusion 2016 update 10 I have had to add groupcasesensitive="yes" to cfoutputs that were ok before

$
0
0

Has anyone else seen this? groupcasesensitive is optional, and the default is "yes", so I was surprised when a user reported the tally by country indicated 40 items found but the country breakdown only summed to 36. Turns out we had 13 for Nigeria and 4 for NIGERIA. The report was displaying NIGERIA 13, first label, last value, which I find baffling.

 

After explicitly adding groupcasesensitive="yes" to that query, everything is as expected- both rows display and the running sub-count now totals to 40.

 

We are standard license on windows. I'll see if I can replicate in a simple demo and share.

Coldfusion Coding Issue

$
0
0

Hello I'm not the greatest at Coldfusion I'm trying to get it to look at a field in our sql table and if it's not black to print "f:" with the stockas info. I also need it to look at another field crossfile and when it's true (1) to change the upc label to say "xf:" instead of "f:". My issue so far is I can get it to print the cross file fine, but when file as is filled out and crossfile is false (0) it won't print out "f:" it's just blank like it is when nothing is under stockas. Here's part of my coding that it effects:

 

 

<cfquery name="qPrt" Datasource="#Data.Datasource#" >

    SELECT    p.ItemID, p.UPC, p.vendorID, p.SKU,   p.StockAs, p.Artist, p.Title, p.RetailPrice, p.releaseDate, p.Attribute2

            , g.generalCategory, p.Crossfile

    FROM    Item p

      LEFT JOIN GeneralCategory g ON p.GeneralCategory = g.generalCategoryID

    Where p.ItemID = <cfqueryparam cfsqltype="cf_sql_integer" value="#url.PID#" >

</cfquery>

 

 

<cfif #qPrt.StockAS# IS NOT ""><cfset lchar = 10><cfelse><cfset lchar = 25></cfif>

    <span style="font-size:11px; font-weight:bold;">#Left(qPrt.Artist,lchar)#<cfif #qPrt.StockAS# IS NOT "" and #qPrt.Crossfile# eq 0>-F: #Left(qPrt.StockAS,15)#</cfif><cfif #qPrt.StockAS# IS NOT "" and #qPrt.Crossfile# eq 1>-XF: #Left(qPrt.StockAS,15)#</cfif></span><br>

 

With the coding above it will print a XF:, but if it's only a stockas (f:) it will be blank. What do I need to change in <cfif #qPrt.StockAS# IS NOT "" and #qPrt.Crossfile# eq 0> in order to get it to print with the f:.

 

Thanks

CF2016 HF10 - Losing Application Setting

$
0
0

Environment:

Unix Solaris

Apache 2.4.39

CF2016 HF10

 

I have been having this really weird intermittent issue with uploading files and the only thing I have been able to track it down to is the Application the web transaction is running as displayed in FusionReactor.

 

I'm monitoring for a post transaction and the only time it seems to fail is when it is being run as "Adobe Coldfusion 2016" application, when it normally is run as "XYZ Application" coded in the application.cfc.

 

When the app runs as Adobe Coldfusion 2016 it times out after 20s no JDBC transactions are started and it shows Tomcat WebSocket (JSR356) Filter.

 

A little bit of research and the default timeout for Tomcat connector is 20s

 

CFADMIN settings for timeout on this instance is set to 60s and have verified in server.xml the connector port settings are there.

 

 

When the application succeeds it usually completes in 4-7 seconds.

 

Since upgrading to HF10 I have run the wsconfig upgrade to bring the connectors up to mod_jk/1.2.46

 

We have pushed the application data back out to the environment, cleared all caches, restarted the instances and it is still behaving the same way.

 

Anyone have any idea where to start with troubleshooting why the application is occasionally/intermittently running as different applications?


Subscription Cancellation

$
0
0

HI

Cancel membership has been canceled . How do i return membership ?

Migration of CF8 to CF2018

$
0
0

We have recently purchased and in the process of migrating our Cold Fusion8 Enterprise to Cold Fusion Enterprise 2018 on new machine. followed below steps

Installed CF18 on new machine as Production + Secure Profile

Created CAR file from old CF8 server and deployed on new machine

Got the IIS server configuration using MSWebDeploymentTool.

Ran WebServer ConfigTool to configure IIS with Coldfusion

Now when I am trying to load website through local host I am getting error “HTTP Error 404.2 - Not Found”. Please suggest if I am missing something here.

Evaluate function Error for class length

$
0
0

I am seeing this error when i  have table with different UDF functions that needs to be evaluated. With multiple rows i get this error below.

 

Invalid method Code length 274259 in class file Statement98 The specific sequence of files included or processed is (file name).

 

Can anyone suggest what can be changed within server that can help me evaluate a larger string of data.

 

Thanks in advance

Installing/Configuring PMT

$
0
0

We are updating from Coldfusion11 to Coldfusion2018 and are trying to configure the PMT.  We have installed the PMT on a separate server, but are unable to configure it to auto-discover our CF server nor can we manually add it.  Both the CF server and the PMT server are Redhat Linux.  We assumed that the datastore was created as part of the CF installation, but have also explicitly installed a datastore on the CF server.  Neither seem to work.  When we try to manually add the CF server within PMT, we get a 'Failed to Respond' error message.  We're not sure on which server the datastore should be installed or if we are using the correct port.  We've been using the port that was defined during installation of the PMT.  Within the CF administrator, the monitoring settings indicate that we are not connected to a datastore nor is monitoring enabled.  Are these settings controlled via the web server or the PMT server?

 

I apologize if this information is already available, but I've come up short in my research.  Thanks in advance!

Coldfusion AMI on AWS GovCloud

$
0
0

Is there any way to use the Adobe Coldfusion AMI from the AWS Marketplace in GovCloud? The GovCloud East and West regions do not appear in the Region dropdown in the Pricing section of the page. I thought they had been available at some point in the past when I looked at it, but either I was seeing things or it's no longer an option.

 

My company has been using Coldfusion on AWS EC2 instances for around 4 years, and we're very much interested in switching to a licensing method that allows for auto-scaling. We're hosting our apps on GovCloud due to the FedRAMP certification which helps us comply with our customers' security requirements.

Cold Fusion 2016 Update 10 question

CF 2018 Updates unavailable


Issue with webchart. Watermark is showing.

$
0
0

I migrated my application from CF10 Enterprise to CF11 Enterprise but the chart fail to render in the webpage. It says com.gp.api.jsp.MxServerComponent is not found. I figured out that the required JAR file (wc50) is absent from Coldfusion 11.

Then I found similar discussion here https://forums.adobe.com/thread/1495819 and I did the same thing - copied the required JAR's (wc50 and others which are missing in CF11). Now I can generate the report but it is coming with a visible watermark which says "Adobe ColdFusion 8 Developer Edition Not for production use".   This is surprising, because we were using CF10 earlier and that too licensed version. Then why this watermark? Any help here would be highly appreciated.

CFHTTP ODD ERROR

$
0
0

I have this code
Example #1

<cffile action = "read" file = "./config.txt" variable = "fileContents">

<cfset line1 = listGetAt(fileContents, 1, chr(10))>

<cfset line2 = listGetAt(fileContents, 2, chr(10))>

<cfset AuthKey = #mid(line1,19)#>

<cfset RefToken = #mid(line2,15)#>

 

<cfset contentBody = "grant_type=refresh_token&client_id=bcbb1365893&client_secret=62b5a8a84567992666tf986a3f4 74791e&refresh_token=9312beb987fbd8efebf6dc&scope=read%2Bwrite" />

 

<cfhttp method="POST" url="https://api.wedoo.com/oauth2/access_token">

<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" />

<cfhttpparam type="formfield" name="grant_type" value="refresh_token" />

<cfhttpparam type="formfield" name="client_id" value="bcqq13f2d1d320543524">

<cfhttpparam type="formfield" name="client_secret" value="62b5a8a84567992666tf986a3f474791e" />

<cfhttpparam type="formfield" name="scope" value="read+write" />

<cfhttpparam type="formfield" name="refresh_token" value="#RefToken#" />

</cfhttp>

 

<cfset cfData = cfhttp.filecontent />

<cfoutput>#cfData#</cfoutput>

 

When I run this code I get a 500 error. I'm on a Railo server so I don't get any more info.

I can confirm the RefToken  value from line 5 is 239hy9uiw784fbew43y7

------------------------------------------------------------------------------------------ -------------------------------------------

----------------------------------------------------------------------------------------------------------------------- --------------

But when I actually put the RefToken value in the code it works fine..like this
Example #2
<cffile action = "read" file = "./config.txt" variable = "fileContents">
<cfset line1 = listGetAt(fileContents, 1, chr(10))>

<cfset line2 = listGetAt(fileContents, 2, chr(10))>

<cfset AuthKey = #mid(line1,19)#>

<cfset RefToken = #mid(line2,15)#>

<cfset RefToken = 239hy9uiw784fbew43y7>

 

<cfset contentBody = "grant_type=refresh_token&client_id=bcbb1365893&client_secret=62b5a8a84567992666tf986a3f4 74791e&refresh_token=9312beb987fbd8efebf6dc&scope=read%2Bwrite" />

 

<cfhttp method="POST" url="https://api.wedoo.com/oauth2/access_token">

<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" />

<cfhttpparam type="formfield" name="grant_type" value="refresh_token" />

<cfhttpparam type="formfield" name="client_id" value="bcqq13f2d1d320543524">

<cfhttpparam type="formfield" name="client_secret" value="62b5a8a84567992666tf986a3f474791e" />

<cfhttpparam type="formfield" name="scope" value="read+write" />

<cfhttpparam type="formfield" name="refresh_token" value="239hy9uiw784fbew43y7" />

</cfhttp>

 

<cfset cfData = cfhttp.filecontent />

<cfoutput>#cfData#</cfoutput>

 

When I actually put the refresh_token value in the code like in example #2 it works fine.

 

  1. Has anyone ever encountered this?
  2. Do I have a single quote double quote issue?
  3. Do I need to encode the RefToken value when its inside cfhttp tag?
  4. Are there other parameters that I could add to the cfhttpparam  tag?
  5. Is there another step I need to take when setting the RefToken value?

Could not initialize class coldfusion.mail.MailImpl

$
0
0

We are upgrading from CF11 to CF2018.

 

We have update 2 applied. Whenever we access CFMAIL tag, we get exception "Could not initialize class coldfusion.mail.MailImpl".

 

Any ideas what might cause this?

 

I'm not  heavy into java, but I can't seem to locate where the coldfusion package is to see if the coldfusion.mail.MailImpl is defined ...

 

any help greatly appreciated.

POI Temp files in Windows

$
0
0

I am upgrading to CF 2018 from CF 9.

 

In CF 9 I run the Coldfusion services under a local Windows user I create specifically for the Coldfusion services.  In Windows the c:\users\<CF Username>\AppData \Local\Temp\poifiles directory gets filled with thousands of poi-ooxml--<some number>.tmp files. Nothing in CF cleans these up and after discovering them by accident and having to clean up hundreds of thousands of these leftover files, I have one question: will this same thing happen in CF 2018?

Datetime format ?

$
0
0

Hi All,

   ColdFusion 2018 is passing a datetime in the format '2019-05-16 23:59:00.0'

 

The code I am using is given below

 

<cftry>

<cfset fromDateObject=parsedateTime(datefrom)>

<cfset toDateObject=parsedateTime(dateto)>

<cfset fromDateTimeString=dateFormat(fromDateObject, "yyyy/mm/dd") & " " & timeFormat(fromDateObject, "HH:nn:ss")>

<cfset toDateTimeString=dateFormat(toDateObject, "yyyy/mm/dd") & " " & timeFormat(toDateObject, "HH:nn:ss")>

  <cfstoredproc procedure="dbo.multi_report_pkg.run_multi_report" datasource="#datasource#" username="#Session.UserName#" password="#Session.password#">

    <cfprocparam  value="#Session.multi_rep_id#">

    <cfprocparam  value="#Session.UserName#">

    <cfprocparam  value="#multi_report_def_id#">

    <cfprocparam cfsqltype="CF_SQL_TIMESTAMP" value="#parsedateTime(fromDateTimeString)#">

    <cfprocparam cfsqltype="CF_SQL_TIMESTAMP" value="#parsedateTime(toDateTimeString)#">

    <cfprocparam  value="#period#">

  </cfstoredproc>

<cfcatch type="any">

  <cfdump var="#cfcatch#" label="cfcatch" >

  <cfdump var="#variables#" label="variables">

   <cfdump var="#session#" label="session">

</cfcatch>

</cftry>

 

 

in the backend in Oracle , If I use to_date its not working and I get an error message

"ORA-01830: date format picture ends before converting entire input string

01830. 00000 -  "date format picture ends before converting entire input string"

*Cause: 

*Action:

 

Would like to know what should I use in this case, to make ColdFusion 2018 pass the date in the format yyyy-mm-dd hh24:mi:ss  ?

 

 

Thanks

IQ

Viewing all 5794 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>