Re: coldfusion service stop rsponding or CPU goes up tp 100%

2011-03-24 Thread Jochem van Dieten

On Mon, Mar 21, 2011 at 7:11 PM, tom vallee wrote:
 Sometimes the CPU goes up to 100% and I need to restart the coldfusion 
 service and everything goes back normal
 Sometimes, coldfusion stop responding, if i type my website in internet 
 explorer, it's not responsing but IIS is responding

 i think it might be the JVM settings,

Why do you think so? Can you correlate the problems to occurrences of
garbage collection in your log files?

Jochem


-- 
Jochem van Dieten
http://jochem.vandieten.net/

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343241
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: The vagaries of QueryNew

2011-03-24 Thread Kevin Parker

Doh!

Yes showing code is good and here's the offender...

This was inside the loop and myvar was getting incremented by 1 each loop -
as there were three rows and therefore three loops the last instruction was
to add 3 rows :-)

cfset Temp = QueryAddRow(qNews,#myvar#)

Thanks guys for your help!!


++
Kevin Parker

-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Thursday, 24 March 2011 09:16
To: cf-talk
Subject: RE: The vagaries of QueryNew


It seems like an invalid use of queryAddColumn might have caused this for me
once. I have rarely ever used that function but it seems familiar... As if,
instead of adding the new column and updating the existing rows, it added
the column but added double the rows and updated only the new rows.

I'd have to think it is that or a queryAddRow() mishap.

As others have already pointed out though, seeing the code would be best.


.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com
-Original Message-
From: Kevin Parker [mailto:tras...@internode.on.net] 
Sent: Wednesday, March 23, 2011 7:18 AM
To: cf-talk
Subject: The vagaries of QueryNew


I have a query where I need to add some extra stuff not in the database so
decide to create another query object with QueryNew.

I loop over a query of the table to set cell values and add extra values to
each row etc.

I output the record count for the original query and it shows 3 rows (which
is correct - there are three rows in the table) but when if do a cfdump of
the new query object its shows 6 rows, 3 with the original data and an extra
3 with all cells showing [empty string]

I have no idea where it's getting this from.

Any clues please? TIA!


++
Kevin Parker








~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343242
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Adding more than 1 row in CFGRID

2011-03-24 Thread Chad Baloga

I am having a problem with CFGRID where I get Multiple row insert is not 
supported when a user clicks the insert row button more than once.  Is there a 
way to disable the Add Row button after it is clicked, or does anyone know how 
to get CFGRID to insert more than 1 row at a time?  Thanks 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343243
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Converting regular date to a Spectra formatted database date?

2011-03-24 Thread Gabriel Ortiz

Working with some legacy spectra data and I'm trying to do a sql search based 
on the spectra date. 

A. If I run the code below, I get 03/24/2011 08:58:48 AM

cfset spectraData = 40626.374166700
cfdump var=#dateFormat(spectraData,MM/DD/)#
cfdump var=#timeFormat(spectraData,HH:MM:SS TT)#

B. How do I do this in reverse? In other words, how do I start with 03/24/2011 
08:58:48 AM (or some form of it) and get 40626.374166700?

Thank you,
Gabriel 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343244
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting regular date to a Spectra formatted database date?

2011-03-24 Thread Dorioo

Well, I've found that the code below will give me the first part before the
period (40626). Assuming the second part is the time, I still have to
figure out the calculation it's using.

cfdump var=#datediff(d,12/30/1899,{ts '2011-03-24 00:00:00'})#

- Gabriel

On Thu, Mar 24, 2011 at 10:06 AM, Gabriel Ortiz dor...@gmail.com wrote:


 Working with some legacy spectra data and I'm trying to do a sql search
 based on the spectra date.

 A. If I run the code below, I get 03/24/2011 08:58:48 AM

 cfset spectraData = 40626.374166700
 cfdump var=#dateFormat(spectraData,MM/DD/)#
 cfdump var=#timeFormat(spectraData,HH:MM:SS TT)#

 B. How do I do this in reverse? In other words, how do I start with
 03/24/2011 08:58:48 AM (or some form of it) and get 40626.374166700?

 Thank you,
 Gabriel

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343245
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting regular date to a Spectra formatted database date?

2011-03-24 Thread Kym Kovan

On 25/03/2011 2:11 AM, Dorioo wrote:

 Well, I've found that the code below will give me the first part before the
 period (40626). Assuming the second part is the time, I still have to
 figure out the calculation it's using.

 cfdump var=#datediff(d,12/30/1899,{ts '2011-03-24 00:00:00'})#

.374166700 is a decimal part of a day isn't it?

9am is 3/8 of a day which is .375


-- 

Yours,

Kym Kovan
mbcomms.net.au



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343246
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting regular date to a Spectra formatted database date?

2011-03-24 Thread Raymond Camden

Don't forget - Spectra is just CFML. You should be able to find the
function that is doing the conversion.


On Thu, Mar 24, 2011 at 10:19 AM, Kym Kovan dev-li...@mbcomms.net.au wrote:

 On 25/03/2011 2:11 AM, Dorioo wrote:

 Well, I've found that the code below will give me the first part before the
 period (40626). Assuming the second part is the time, I still have to
 figure out the calculation it's using.

 cfdump var=#datediff(d,12/30/1899,{ts '2011-03-24 00:00:00'})#

 .374166700 is a decimal part of a day isn't it?

 9am is 3/8 of a day which is .375


 --

 Yours,

 Kym Kovan
 mbcomms.net.au



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343247
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting regular date to a Spectra formatted database date?

2011-03-24 Thread morgan l

cfset readableDate = '03/24/2011 08:58:48 AM'
cfdump var=#NumberFormat(readableDAte,.00)#


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343248
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting regular date to a Spectra formatted database date?

2011-03-24 Thread Bryan Stevenson

I don't think this is a  Spectra specific date, but it may be an atomic
date (sorrynot up to speed on all the odd formats).

So the first thing you need to sort out is the type of date format that
number represents.  Then it should be easy to find the function you need
to take a normal date and produce one of those dates (either already
available in CF or perhaps via UDF or other easy bolt-ons).

Wowso some Spectra code actually made it into production before it
collapsed in on itself under its own weight huh ;-)

Cheers


On Thu, 2011-03-24 at 10:06 -0400, Gabriel Ortiz wrote:

 Working with some legacy spectra data and I'm trying to do a sql search based 
 on the spectra date. 
 
 A. If I run the code below, I get 03/24/2011 08:58:48 AM
 
 cfset spectraData = 40626.374166700
 cfdump var=#dateFormat(spectraData,MM/DD/)#
 cfdump var=#timeFormat(spectraData,HH:MM:SS TT)#
 
 B. How do I do this in reverse? In other words, how do I start with 
 03/24/2011 08:58:48 AM (or some form of it) and get 40626.374166700?
 
 Thank you,
 Gabriel 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343249
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting regular date to a Spectra formatted database date?

2011-03-24 Thread Dorioo

Thank you all.

@Bryan: True. I'm sure it's not specific to spectra, but I knew anyone that
has worked with a date from spectra would recognize what I meant by the
example. Didn't know what else to call it.

@Ray: No access to spectra code. Just the legacy data.

@Kym: Good catch, it does seem to be the percentage of the day.

@Morgan: Thank you! Numberformat with that mask is the winner. Below are
results and test code. I think maybe the milliseconds are what's throwing it
off but it's more than close enough for my needs.

SpectraDate: 40549.556261600
Dateformat: 01/06/2011
TimeFormat: 13:21:01 PM
Numberformat: 40549.5562615741
--
SpectraDate: 40626.374166700
Dateformat: 03/24/2011
TimeFormat: 08:58:48 AM
Numberformat: 40626.374167
--
SpectraDate: 39972.642604200
Dateformat: 06/08/2009
TimeFormat: 15:25:21 PM
Numberformat: 39972.6426041667

cfoutput

cfset spectraDate = 40549.556261600
cfset dateFormattedSD = dateFormat(spectraDate,MM/DD/)
cfset timeFormattedSD = timeFormat(spectraDate,HH:MM:SS TT)
cfset readableDate = dateFormattedSD timeFormattedSD

SpectraDate: #spectraDate# br
Dateformat: #dateFormattedSD# br
TimeFormat: #timeFormattedSD# br
Numberformat: #numberformat(readableDate,.00)#

hr

cfset spectraDate = 40626.374166700
cfset dateFormattedSD = dateFormat(spectraDate,MM/DD/)
cfset timeFormattedSD = timeFormat(spectraDate,HH:MM:SS TT)
cfset readableDate = dateFormattedSD timeFormattedSD

SpectraDate: #spectraDate# br
Dateformat: #dateFormattedSD# br
TimeFormat: #timeFormattedSD# br
Numberformat: #numberformat(readableDate,.00)#

hr

cfset spectraDate = 39972.642604200
cfset dateFormattedSD = dateFormat(spectraDate,MM/DD/)
cfset timeFormattedSD = timeFormat(spectraDate,HH:MM:SS TT)
cfset readableDate = dateFormattedSD timeFormattedSD

SpectraDate: #spectraDate# br
Dateformat: #dateFormattedSD# br
TimeFormat: #timeFormattedSD# br
Numberformat: #numberformat(readableDate,.00)#

/cfoutput

Thank you,
Gabriel


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343250
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Verity collection

2011-03-24 Thread Keith McGee

I'm using cold fusion 8 enterprise, I have 34 collections and a couple of them 
are will not return correctly. 

here are two collection

rmlicgpdsenglish 345 1,637 Mar 24 2011 1:55 PM  english No
rmlicgpdsfrench  174 1,163 Mar 24 2011 1:55 PM  french  No


if you run this query; it will return the 174 french files
cfsearch 
name=get_pds_files 
collection=rmlicgpdsfrench
type=simple


if you run this query; this will also return the 174 french files
cfsearch 
name=get_pds_files 
collection=rmlicgpdsenglish
type=simple


This also happens with a couple more of the collections, I have deleted and 
recreated the collections,renamed the query, tried different types, any 
suggestions


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343251
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Eric Cobb

I know that complex data types (structs, CFCs, queries, COM/JavaObjects, 
etc...) are passed by reference, not by value.  But I'm wondering how 
that works when storing them in the session scope.

For example, let's say I have a query that returns a really large result 
set, and after that query runs I store the query results as a variable 
in the session scope.

cfquery name=variables.qry
 select*
 FROMbigTable
/cfquery

cfset session.myQry = variables.qry

Would the above code just create a reference to the result set already 
in memory, or would it actually create a copy of the results in the 
session?

In a similar scenario, what would happen if I had a CFC object stored in 
the session, then passed my query results to it to be stored in that 
CFCs variables scope?

cfquery name=variables.qry
 select*
 FROMbigTable
/cfquery

cfset session.myCFC.blah(variables.qry)

-- 

Thanks,

Eric Cobb
http://www.cfgears.com
Help me make a difference this summer. http://bit.ly/i8dJvQ




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343252
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Greg Morphis

I don't know for sure but since CF is built on Java and Java is
strictly pass by value, I would assume that CF is too.
Maybe someone more knowledgeable will ring in

On Thu, Mar 24, 2011 at 2:49 PM, Eric Cobb cft...@ecartech.com wrote:

 I know that complex data types (structs, CFCs, queries, COM/JavaObjects,
 etc...) are passed by reference, not by value.  But I'm wondering how
 that works when storing them in the session scope.

 For example, let's say I have a query that returns a really large result
 set, and after that query runs I store the query results as a variable
 in the session scope.

 cfquery name=variables.qry
     select    *
     FROM    bigTable
 /cfquery

 cfset session.myQry = variables.qry

 Would the above code just create a reference to the result set already
 in memory, or would it actually create a copy of the results in the
 session?

 In a similar scenario, what would happen if I had a CFC object stored in
 the session, then passed my query results to it to be stored in that
 CFCs variables scope?

 cfquery name=variables.qry
     select    *
     FROM    bigTable
 /cfquery

 cfset session.myCFC.blah(variables.qry)

 --

 Thanks,

 Eric Cobb
 http://www.cfgears.com
 Help me make a difference this summer. http://bit.ly/i8dJvQ




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343253
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Brian Kotek

All complex data types are always passed by reference. Where you set them
makes no difference. (Except arrays, which are passed by value due to a
staggeringly poor decision eons ago.)


On Thu, Mar 24, 2011 at 3:49 PM, Eric Cobb cft...@ecartech.com wrote:


 I know that complex data types (structs, CFCs, queries, COM/JavaObjects,
 etc...) are passed by reference, not by value.  But I'm wondering how
 that works when storing them in the session scope.

 For example, let's say I have a query that returns a really large result
 set, and after that query runs I store the query results as a variable
 in the session scope.

 cfquery name=variables.qry
 select*
 FROMbigTable
 /cfquery

 cfset session.myQry = variables.qry

 Would the above code just create a reference to the result set already
 in memory, or would it actually create a copy of the results in the
 session?


 In a similar scenario, what would happen if I had a CFC object stored in
 the session, then passed my query results to it to be stored in that
 CFCs variables scope?

 cfquery name=variables.qry
 select*
 FROMbigTable
 /cfquery

 cfset session.myCFC.blah(variables.qry)

 --

 Thanks,

 Eric Cobb
 http://www.cfgears.com
 Help me make a difference this summer. http://bit.ly/i8dJvQ




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343254
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Carl Von Stetten

I'm trying to wrap my head around this, so please excuse me for jumping 
in.  If I understand this correctly, the query result is an object 
placed in memory when execution is complete, and variables.qry is merely 
a pointer to that object.  When the cfset session.myQry = 
variables.qry is executed, a second pointer to the query object is 
created, in the session scope.  When page execution completes, the 
variables.qry pointer disappears (and I assume is garbage collected at 
some point), but because the session.myQry pointer still exists in the 
session scope, the query object remains in memory instead of being 
garbage collected.  Once the session times out, assuming there are no 
other pointers to the query object existing, it would then be garbage 
collected.

Is this a correct understanding, or am I completely off my rocker?
Thanks,
Carl

On 3/24/2011 12:59 PM, Brian Kotek wrote:
 All complex data types are always passed by reference. Where you set them
 makes no difference. (Except arrays, which are passed by value due to a
 staggeringly poor decision eons ago.)


 On Thu, Mar 24, 2011 at 3:49 PM, Eric Cobbcft...@ecartech.com  wrote:

 I know that complex data types (structs, CFCs, queries, COM/JavaObjects,
 etc...) are passed by reference, not by value.  But I'm wondering how
 that works when storing them in the session scope.

 For example, let's say I have a query that returns a really large result
 set, and after that query runs I store the query results as a variable
 in the session scope.

 cfquery name=variables.qry
  select*
  FROMbigTable
 /cfquery

 cfset session.myQry = variables.qry

 Would the above code just create a reference to the result set already
 in memory, or would it actually create a copy of the results in the
 session?

 In a similar scenario, what would happen if I had a CFC object stored in
 the session, then passed my query results to it to be stored in that
 CFCs variables scope?

 cfquery name=variables.qry
  select*
  FROMbigTable
 /cfquery

 cfset session.myCFC.blah(variables.qry)

 --

 Thanks,

 Eric Cobb
 http://www.cfgears.com
 Help me make a difference this summer. http://bit.ly/i8dJvQ





 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343255
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Brian Kotek

That's correct.

On Thu, Mar 24, 2011 at 4:18 PM, Carl Von Stetten
vonner.li...@vonner.netwrote:


 I'm trying to wrap my head around this, so please excuse me for jumping
 in.  If I understand this correctly, the query result is an object
 placed in memory when execution is complete, and variables.qry is merely
 a pointer to that object.  When the cfset session.myQry =
 variables.qry is executed, a second pointer to the query object is
 created, in the session scope.  When page execution completes, the
 variables.qry pointer disappears (and I assume is garbage collected at
 some point), but because the session.myQry pointer still exists in the
 session scope, the query object remains in memory instead of being
 garbage collected.  Once the session times out, assuming there are no
 other pointers to the query object existing, it would then be garbage
 collected.

 Is this a correct understanding, or am I completely off my rocker?
 Thanks,
 Carl

 On 3/24/2011 12:59 PM, Brian Kotek wrote:
  All complex data types are always passed by reference. Where you set them
  makes no difference. (Except arrays, which are passed by value due to a
  staggeringly poor decision eons ago.)
 
 
  On Thu, Mar 24, 2011 at 3:49 PM, Eric Cobbcft...@ecartech.com  wrote:
 
  I know that complex data types (structs, CFCs, queries, COM/JavaObjects,
  etc...) are passed by reference, not by value.  But I'm wondering how
  that works when storing them in the session scope.
 
  For example, let's say I have a query that returns a really large result
  set, and after that query runs I store the query results as a variable
  in the session scope.
 
  cfquery name=variables.qry
   select*
   FROMbigTable
  /cfquery
 
  cfset session.myQry = variables.qry
 
  Would the above code just create a reference to the result set already
  in memory, or would it actually create a copy of the results in the
  session?
 
  In a similar scenario, what would happen if I had a CFC object stored in
  the session, then passed my query results to it to be stored in that
  CFCs variables scope?
 
  cfquery name=variables.qry
   select*
   FROMbigTable
  /cfquery
 
  cfset session.myCFC.blah(variables.qry)
 
  --
 
  Thanks,
 
  Eric Cobb
  http://www.cfgears.com
  Help me make a difference this summer. http://bit.ly/i8dJvQ
 
 
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343256
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Carl Von Stetten

Wow, I finally got it!!! :-)
Thanks,
Carl

On 3/24/2011 1:27 PM, Brian Kotek wrote:
 That's correct.

 On Thu, Mar 24, 2011 at 4:18 PM, Carl Von Stetten
 vonner.li...@vonner.netwrote:

 I'm trying to wrap my head around this, so please excuse me for jumping
 in.  If I understand this correctly, the query result is an object
 placed in memory when execution is complete, and variables.qry is merely
 a pointer to that object.  When thecfset session.myQry =
 variables.qry  is executed, a second pointer to the query object is
 created, in the session scope.  When page execution completes, the
 variables.qry pointer disappears (and I assume is garbage collected at
 some point), but because the session.myQry pointer still exists in the
 session scope, the query object remains in memory instead of being
 garbage collected.  Once the session times out, assuming there are no
 other pointers to the query object existing, it would then be garbage
 collected.

 Is this a correct understanding, or am I completely off my rocker?
 Thanks,
 Carl

 On 3/24/2011 12:59 PM, Brian Kotek wrote:
 All complex data types are always passed by reference. Where you set them
 makes no difference. (Except arrays, which are passed by value due to a
 staggeringly poor decision eons ago.)


 On Thu, Mar 24, 2011 at 3:49 PM, Eric Cobbcft...@ecartech.com   wrote:

 I know that complex data types (structs, CFCs, queries, COM/JavaObjects,
 etc...) are passed by reference, not by value.  But I'm wondering how
 that works when storing them in the session scope.

 For example, let's say I have a query that returns a really large result
 set, and after that query runs I store the query results as a variable
 in the session scope.

 cfquery name=variables.qry
   select*
   FROMbigTable
 /cfquery

 cfset session.myQry = variables.qry

 Would the above code just create a reference to the result set already
 in memory, or would it actually create a copy of the results in the
 session?
 In a similar scenario, what would happen if I had a CFC object stored in
 the session, then passed my query results to it to be stored in that
 CFCs variables scope?

 cfquery name=variables.qry
   select*
   FROMbigTable
 /cfquery

 cfset session.myCFC.blah(variables.qry)

 --

 Thanks,

 Eric Cobb
 http://www.cfgears.com
 Help me make a difference this summer. http://bit.ly/i8dJvQ






 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343257
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Is saving a query in the session passed by reference or by value?

2011-03-24 Thread Russ Michaels

the easy solution is to create the query in the session scope to begin with

cfquery name=session.myquery

however storing complex vars such as queries in sessions for every single
user can consume a lot of memory.
If the contents of the query are not unique to each user, you could just
cache one copy in application scope.
The other alternative is to cache the entire dataset you need to store on in
application scope and use query of query for each user to get their subset
of data.
If storing the query in the session is a must, you may want to try
converting it to JSON or WDDX and see how much memory this uses compared to
the query.
Don;t forget not to select columns you don't need.



On Thu, Mar 24, 2011 at 8:48 PM, Carl Von Stetten
vonner.li...@vonner.netwrote:


 Wow, I finally got it!!! :-)
 Thanks,
 Carl

 On 3/24/2011 1:27 PM, Brian Kotek wrote:
  That's correct.
 
  On Thu, Mar 24, 2011 at 4:18 PM, Carl Von Stetten
  vonner.li...@vonner.netwrote:
 
  I'm trying to wrap my head around this, so please excuse me for jumping
  in.  If I understand this correctly, the query result is an object
  placed in memory when execution is complete, and variables.qry is merely
  a pointer to that object.  When thecfset session.myQry =
  variables.qry  is executed, a second pointer to the query object is
  created, in the session scope.  When page execution completes, the
  variables.qry pointer disappears (and I assume is garbage collected at
  some point), but because the session.myQry pointer still exists in the
  session scope, the query object remains in memory instead of being
  garbage collected.  Once the session times out, assuming there are no
  other pointers to the query object existing, it would then be garbage
  collected.
 
  Is this a correct understanding, or am I completely off my rocker?
  Thanks,
  Carl
 
  On 3/24/2011 12:59 PM, Brian Kotek wrote:
  All complex data types are always passed by reference. Where you set
 them
  makes no difference. (Except arrays, which are passed by value due to a
  staggeringly poor decision eons ago.)
 
 
  On Thu, Mar 24, 2011 at 3:49 PM, Eric Cobbcft...@ecartech.com
 wrote:
 
  I know that complex data types (structs, CFCs, queries,
 COM/JavaObjects,
  etc...) are passed by reference, not by value.  But I'm wondering how
  that works when storing them in the session scope.
 
  For example, let's say I have a query that returns a really large
 result
  set, and after that query runs I store the query results as a variable
  in the session scope.
 
  cfquery name=variables.qry
select*
FROMbigTable
  /cfquery
 
  cfset session.myQry = variables.qry
 
  Would the above code just create a reference to the result set already
  in memory, or would it actually create a copy of the results in the
  session?
  In a similar scenario, what would happen if I had a CFC object stored
 in
  the session, then passed my query results to it to be stored in that
  CFCs variables scope?
 
  cfquery name=variables.qry
select*
FROMbigTable
  /cfquery
 
  cfset session.myCFC.blah(variables.qry)
 
  --
 
  Thanks,
 
  Eric Cobb
  http://www.cfgears.com
  Help me make a difference this summer. http://bit.ly/i8dJvQ
 
 
 
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343258
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


SOT - Members only app

2011-03-24 Thread cfcom

Can anyone recommend a good app for creating a simple and secure members
section 

Thanks



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343259
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT - Members only app

2011-03-24 Thread Russ Michaels

if you are simply asking about the security side of things, then the best
way is to use .htaccess which will secure EVERYTHING, not use cf files. You
should already have this or something equivalent  available by default, ask
your host.



On Thu, Mar 24, 2011 at 10:35 PM, cfcom cf...@aceligent.com wrote:


 Can anyone recommend a good app for creating a simple and secure members
 section

 Thanks



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343260
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT - Members only app

2011-03-24 Thread Jake Churchill

Farcry
On Mar 24, 2011 5:36 PM, cfcom cf...@aceligent.com wrote:

 Can anyone recommend a good app for creating a simple and secure members
 section

 Thanks



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343261
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: SOT - Members only app

2011-03-24 Thread cfcom

Need to make login feature that unlocks site pages for specific visitors

-Original Message-
From: Russ Michaels [mailto:r...@michaels.me.uk] 
Sent: 2011-03-24 18:44
To: cf-talk
Subject: Re: SOT - Members only app


if you are simply asking about the security side of things, then the best
way is to use .htaccess which will secure EVERYTHING, not use cf files. You
should already have this or something equivalent  available by default, ask
your host.



On Thu, Mar 24, 2011 at 10:35 PM, cfcom cf...@aceligent.com wrote:


 Can anyone recommend a good app for creating a simple and secure members
 section

 Thanks



 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343262
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SOT - Members only app

2011-03-24 Thread Gerald Guido

http://tutorial355.easycfm.com/

On Thu, Mar 24, 2011 at 6:56 PM, cfcom cf...@aceligent.com wrote:


 Need to make login feature that unlocks site pages for specific visitors

 -Original Message-
 From: Russ Michaels [mailto:r...@michaels.me.uk]
 Sent: 2011-03-24 18:44
 To: cf-talk
 Subject: Re: SOT - Members only app


 if you are simply asking about the security side of things, then the best
 way is to use .htaccess which will secure EVERYTHING, not use cf files. You
 should already have this or something equivalent  available by default, ask
 your host.



 On Thu, Mar 24, 2011 at 10:35 PM, cfcom cf...@aceligent.com wrote:

 
  Can anyone recommend a good app for creating a simple and secure members
  section
 
  Thanks
 
 
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343263
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm