Pages

Thursday, February 19, 2015

java.lang.StackOverflowError at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121) at

java.lang.StackOverflowError at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)


check below items in your code to fix this error.

1. this is mainly with coldfusion memory leak
2. this may be because of coldfusion variable conflict with same names.
3. coldfusion may trying to find the variable/object with same name in a CFC which has same name of object.

4. try to find same variable name in your own CFC which you are creating and same variable name in CFCs which you created. 
its possible CFCs that you created they are using same variable scope variable name and same CFC object 

Monday, January 12, 2015

[Macromedia][SQLServer JDBC Driver][SQLServer]The multi-part identifier could not be bound.

 [Macromedia][SQLServer JDBC Driver][SQLServer]The multi-part identifier "local.QryVatCode.VatCode_id" could not be bound.



this will come when you dont use ## signs inside in cfquery for any dynamic variable execution,


think if you are doing something like this.


<cfquery>
insert table1 (col1)
values (val1)
</cfquery>


if val1 is a coldfusion variable, then you have to do #val1#


<cfquery>
insert table1 (col1)
values (#val1#)
</cfquery>



Dynamically display all column data of a cfquery // get column value dynamically cfquery coldfusion //


Dynamically display all column data of a cfquery. 

this is useful when you don't know the name of columns of your cfquery result.


<cfloop query="Data">

       <cfloop list="#data.Columnlist#" index="local.Column" delimiters="," >

        <cfoutput>
              #Data[local.column][Data.currentrow]#
        </cfoutput>

</cfloop>
</cfloop>



Notes: 
1. data is query
2. data.columnlist is comma separted columnlist of a query

Monday, January 5, 2015

[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 80) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.


Coldfusion 

ErrorCode1205

Deadlock Transaction because of cftransaction. 

Error is:
[Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 80) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

java.sql.SQLTransactionRollbackException: [Macromedia][SQLServer JDBC Driver][SQLServer]Transaction (Process ID 80) was deadlocked on lock resources with another process and has been chosen as the deadlock victim.



<cfquery name="qryGetLastID" datasource="#variables.Pub_DS#">
      SET NOCOUNT ON

      insert into table
      (column1,datecreated,createdby)
      values(1,2,3)

      SELECT @@Identity AS maxID
      SET NOCOUNT OF
</cfquery>

Wednesday, May 14, 2014

comparing ms sql date with coldfusion date

comparing ms sql date with coldfusion date


if you use cfsqltype as "cf_sql_date" when you compare date with function CreateODBCDateTime then it will not match so use this data type "cf_sql_timestamp"



Error code: 
and SupplyDate =  <CFQUERYPARAM cfsqltype="cf_sql_date" Value="#CreateODBCDateTime(local.ctrArrSMThisSupplyDetailsSupplyDates.SupplyDate)#">



fixed code: 
and SupplyDate =  <CFQUERYPARAM cfsqltype="cf_sql_timestamp" Value="#CreateODBCDateTime(local.ctrArrSMThisSupplyDetailsSupplyDates.SupplyDate)#">

Wednesday, April 30, 2014

Entity has incorrect type for being called as a function coldfusion

Entity has incorrect type for being called as a function coldfusion

 may be you have some variable name and function name same.

Example code-

<cfset  fgGetMeyourName = fgGetMeyourName (1)>

<cffunction name ="fgGetMeyourName">
        <cfargument name="id" >
        <!--- do ur code -->

</cffunction>

in above example- fgGetMeyourName is variable and function name both. this will give error.

FIX: your function name and variable name needs to be different. 


Thursday, January 23, 2014

populating a table from cfquery result

 this is how you can insert into a table from cfquery resultset.

many insert cfquery will be a bad idea. this is also not a very efficient way but kind of okay.  best thing you can do is to prepare a xml set and insert through  a stored proc through xml insert.

this is easy to do in cf.
1. your query is "qryCodeValue"

<cfsavecontent variable="qryTorun">                     
                    INSERT INTO table (ListNumber,listvalue) VALUES
                    <cfoutput query="qryCodeValue">                                          
                        (#qryCodeValue.ListNumber#, '#qryCodeValue.codevalue#)
                    <cfif qryCodeValue.currentRow EQ qryCodeValue.recordCount>;<cfelse>,</cfif>
                    </cfoutput>
</cfsavecontent>

 <cfquery name="qryRunInsertVar" datasource="#yourDS#">                                                               
              #REReplace(qryTorun,"''","'","ALL")#                          
 </cfquery>