RE: [ACFUG Discuss] cfdocument error

2010-02-04 Thread Charlie Arehart
Wow, and this one was sent Wed at 5pm. Oy! 

 

John, any possible explanation for that on the server end? The notes had
definitely left my machine, and I've had interactions with others on this
address, so it's not seemingly an issue on my mail server.

Sorry, folks, that a few of my replies will seem out of order, if not "out
of the blue". :-(

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Charlie Arehart
Sent: Wednesday, February 03, 2010 5:33 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] cfdocument error

 

Is this 8.01, Howard? Since you refer to images, if you may be processing
them with CFIMAGE, there's a hotfix for image processing specifically
related to problems with the resulting files, and it may be connected to
your problem. See: 

http://kb2.adobe.com/cps/403/kb403411.html

And note that while it was briefly included in CFH 3 for CF 8.01, it was no
longer after 9/16: http://kb2.adobe.com/cps/511/cpsid_51180.html

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of John Youngman
Sent: Wednesday, February 03, 2010 3:18 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] cfdocument error

 

ah there's images that might be the thing ..never used it with


 

however after a quick google, I found this:

http://www.communitymx.com/content/article.cfm?cid=C7DD6

 

does this help any?

 

From: Jeff Howard   

Sent: Wednesday, February 03, 2010 2:03 PM

To: discussion@acfug.org 

Subject: Re: [ACFUG Discuss] cfdocument error

 

Yes, essentially this is an app for expense reports.  The user uploads
images and supporting documents when submitting the expense report.  This
particular part of app is creating a pdf for the user to be able to print.
I think it might have something to do with the images.

 

When I looked closer at the Flashpaper version it seems to be getting hungup
on one of the images since it is hanging after only displaying about half
the images of receipts at this time.

 


- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink   
- 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] Query or Stored Proc calling

2010-02-04 Thread Charlie Arehart
Wow, I had sent this a long time before it arrived (sent at 10:12) well
before Ajas replied to Derrick and Teddy. Sorry. Don't know why it got held
up (as did a few messages of mine to the list, which all arrived around 12).
Odd.

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Charlie Arehart
Sent: Thursday, February 04, 2010 10:12 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Query or Stored Proc calling

 

Ajas, given your experience with CF, I'm a little confused how to reply. If
this was a brand new user, I'd say that they have things backward and even
then still misunderstood.

First, the main difference is that the code in blue would execute once for
each query result, whereas the code in red would execute only once, for the
first record in the result set. Also, you go on to refer to things in terms
of "executing the query" more than once, but that never happens in either
example. The query is executed only once (unless the cfquery itself us
somehow in another loop). The difference is only a matter of whether the
query's results are looped over (first example) or not (second example).

Second, it seems that you're maybe thinking that the use of the queryname
before the column name has some affect on how many records are processed,
but it does not. It's simply that if (in the first example) you're in a
CFQUERY output loop, the queryname is optional (though recommended) as CF
can figure out that the varname is a reference to a query column name
because the queryname becomes a sort of default scope for the life of the
query loop. But in the plain cfoutput (the second example, which is not a
loop), then the queryname is not a part of the normal scope search, so CF
would not know that the variable references were query columns, so you must
provide them.

Finally, none of this changes if it's a cfstoredproc/cfprocresult or a
cfquery. 

Does that help? Or is there something more to your question that I'm not
seeing? 

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Ajas Mohammed
Sent: Wednesday, February 03, 2010 10:21 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Query or Stored Proc calling

 

Hi,

I came across code like this


   select col1,col2,col3 from tbl where condition


Now, instead of using  col1  col2  col3  ,
the code uses getSomething.col1  getSomething.col2 
getSomething.col3  

The code in blue would do ONLY ONE CALL to query and display results.

My take is that, the code in red is executing the query every time col1 thru
col3 are referenced with query name. Is this correct? Also if getSomething
was a cfprocresult name, the stored proc would be executed for every
reference to stored proc name.colname right?

Thanks,


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.


- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink   
- 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



[ACFUG Discuss] getPageContext() and low-level internals

2010-02-04 Thread Clarke Bishop
Has anyone here ever used getPageContext() to get the low-level specifics of
an HTTP request?

 

Some of the CFWheels guys need to use this to extend the framework. 

 

This works for normal form submissions:

getPageContext().getRequest().getParameterMap()

 

But, it just returns null for multi-part forms. Is there a multi-part
equivalent that will return the parameter map?

 

If it helps, here's a link to some code:

http://stackoverflow.com/questions/2194442/getpagecontext-getrequest- 

 

I'm hoping there's a ColdFusion J2EE guru on this list that can help!

 

Thanks for any ideas!

 

   Clarke

 

Office: 770-642-1353
eMail: cbis...@resultantsys.com

 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



Re: [ACFUG Discuss] a very strange sql error that only happens when using CF

2010-02-04 Thread Dusty Hale
I did end up re doing the entire query in a cfquery tag instead of the
connection string. I also used the queryparam tags like below. Seems to have
resolved the error and hopefully prevents SQL injection too.

Thanks

On Wed, Jan 27, 2010 at 5:30 PM, Teddy R. Payne wrote:

> Dusty,
> How about something like this?
>
>
>  datasource="#application.dsn_name#"
> username="#application.db_user#"
> password="#application.db_pword#">
>
> select
> [donorid] ,
> [occupation] ,
> [race] ,
> [haircolor] ,
> [hairtexture] ,
> [eyecolor] ,
> [religion] ,
> [bloodtype] ,
> [height] ,
> [weight] ,
> [heightmetric] ,
> [weightmetric] ,
> [reportedpregnancy] ,
> [opendonorid] ,
> [infomp3avail] ,
> [ethnicity] ,
> [cmvstatus] ,
> [DateEntered] ,
> [ARTavail] ,
> [ARTonly] ,
> [SelectDonors]
> from
> [v_websearch]
> where
> [available] = 1
> 
> and [haircolor] like  cfsqltype="cf_sql_varchar" />
> 
>
> 
>
> Qualify the columns and the view and query param the search string.  This
> may also add some legibility as well.
>
>
>
> Teddy R. Payne, ACCFD
> Google Talk - teddyrpa...@gmail.com
>
>
>
> On Wed, Jan 27, 2010 at 4:25 PM, Dusty Hale  wrote:
>
>> I also stopped using the  tag and now it works:
>>
>> 
>> classLoader = createObject("java", "java.lang.Class");
>> classLoader.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>> dm = createObject("java","java.sql.DriverManager");
>>
>> con = dm.getConnection("jdbc:odbc:DRIVER={SQL Server};Database=" &
>> application.db_name & ";Server=" & application.dbserver_name & ";",
>> application.db_user, application.db_pword);
>>
>> qText = "Select donorid, occupation, race, haircolor, hairtexture,
>> eyecolor, religion, bloodtype, height, weight, heightmetric, weightmetric,
>> reportedpregnancy, opendonorid, infomp3avail, ethnicity, cmvstatus,
>> DateEntered, ARTavail, ARTonly, SelectDonors FROM v_websearch where
>> available = 1 ";
>> if(len(drpHairColor)){
>> qText = qText & "AND haircolor like '" & drpHairColor & "%' ";
>> }
>> if(len(drpEyeColor)){
>> qText = qText & "AND eyecolor like '" & drpEyeColor & "%' ";
>> }
>> if(len(drpEthnic)){
>> qText = qText & "AND ethnicity like '" & drpEthnic & "%' ";
>>
>> }
>> if(len(txtDonorId)){
>> qText = qText & "AND donorid like '%" & txtDonorId & "%' ";
>> }
>> //if(chkAudioFile){
>> //qText = qText & "AND InfoMP3Avail = 1 ";
>> //}
>> if(chkOpenId){
>> qText = qText & "AND OpenDonorID = 1 ";
>> }
>> if(chkCanadian){
>> qText = qText & "AND CanadianCompliantAvail = 1 ";
>> }
>> if(len(drpRace)){
>> qText = qText & "AND race like '" & drpRace & "%' ";
>> }
>> if(len(drpReligion)){
>> qText = qText & "AND religion like '" & drpReligion & "%' ";
>> }
>> if(len(drpBloodType)){
>> qText = qText & "AND bloodtype like '" & drpBloodType & "%' ";
>> }
>> if(len(drpHeight)){
>> if(drpHeight eq "1-66"){
>> qText = qText & "AND heightregular < 507 ";
>> }
>> if(drpHeight eq "67-71"){
>> qText = qText & "AND heightregular < 512 AND heightregular >
>> 507 ";
>> }
>> if(drpHeight eq "72-76"){
>> qText = qText & "AND heightregular < 605 AND heightregular >
>> 512 ";
>> }
>> if(drpHeight eq "77-100"){
>> qText = qText & "AND heightregular > 604 ";
>> }
>> }
>> if(IsNumeric(txtWeight1) AND IsNumeric(txtWeight2)){
>> if(chkWeight is "kg"){
>> qText = qText & " AND weightmetric <= " & txtWeight2 & " AND
>> weightmetric >= " & txtWeight1 & " ";
>> }
>> else{
>> qText = qText & " AND weight <= " & txtWeight2 & " AND weight
>> >= " & txtWeight1 & " ";
>> }
>> }
>> if(len(drpCMVstatus)){
>> qText = qText & "AND cmvstatus like '" & drpCMVstatus & "%' ";
>> }
>> if(chkART){
>> qText = qText & "AND ARTavail IS NOT NULL ";
>> }
>> if(chkSelect){
>> qText = qText & "AND SelectDonors IS NOT NULL ";
>> }
>> qText = qText & "ORDER BY donorid";
>> st = con.createStatement();
>> rs = st.ExecuteQuery(qText);
>> q = createObject("java", "coldfusion.sql.QueryTable").init(rs);
>>
>> stRecordCount = con.createStatement();
>> rs2 = stRecordCount.ExecuteQuery("Select count(*) AS MyCount FROM
>> tbldonors where available = 1");
>> qRecordCount = createObject("java",
>> "coldfusion.sql.QueryTable").init(rs2);
>> 

RE: [ACFUG Discuss] cfdocument error

2010-02-04 Thread Troy Jones
In fact, yes, I have and currently am. I'd love to see an answer to this too.

[cid:image001.jpg@01CAA4DB.5C2A7580]
___

Troy Jones  |  Director of Technical Services  |  Dynapp Inc  |  1-800-830-5192 
 ext. 603  |  dynapp.com  |  
facebook.com/dynapp

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Jeff Howard
Sent: Wednesday, February 03, 2010 2:12 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] cfdocument error

Has anyone ever had an issue with a pdf file created with cfdocument being 
corrupt?  I've tried dumping the data outside the cfdocument and it works fine 
but when I simply put it in a simple tag , the browser 
load really slow and then I get an error message saying cannot display the 
document it is corrput.

Anyone ever experienced this?

Thanks,
Jeff



-

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-


<>

RE: [ACFUG Discuss] cfdocument error

2010-02-04 Thread Wes Byrd
Ah...  well, that explains my issues as well.  I installed CF8.01 on a 64 bit 
server and applied the cumulative hot fix #4 thinking it was "cumulative".  
I see however that the hot fix #71557 (CFImage and Image functions update) was 
not included in the "Cumulative" Hot Fix 4 
(http://kb2.adobe.com/cps/529/cpsid_52915.html).   Ugg!!!

Thanks for the info Charlie!

Wes
[cid:image001.jpg@01CAA594.F69BA9E0]
___

Wes Byrd  |  CIO  |  Dynapp Inc  |  1-800-830-5192  ext. 601  |  
dynapp.com  |  
facebook.com/dynapp



From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Charlie Arehart
Sent: Wednesday, February 03, 2010 5:33 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] cfdocument error

Is this 8.01, Howard? Since you refer to images, if you may be processing them 
with CFIMAGE, there's a hotfix for image processing specifically related to 
problems with the resulting files, and it may be connected to your problem. See:

http://kb2.adobe.com/cps/403/kb403411.html

And note that while it was briefly included in CFH 3 for CF 8.01, it was no 
longer after 9/16: http://kb2.adobe.com/cps/511/cpsid_51180.html

/charlie

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of John Youngman
Sent: Wednesday, February 03, 2010 3:18 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] cfdocument error

ah there's images that might be the thing ..never used it with 


however after a quick google, I found this:
http://www.communitymx.com/content/article.cfm?cid=C7DD6

does this help any?

From: Jeff Howard
Sent: Wednesday, February 03, 2010 2:03 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] cfdocument error

Yes, essentially this is an app for expense reports.  The user uploads images 
and supporting documents when submitting the expense report.  This particular 
part of app is creating a pdf for the user to be able to print.  I think it 
might have something to do with the images.

When I looked closer at the Flashpaper version it seems to be getting hungup on 
one of the images since it is hanging after only displaying about half the 
images of receipts at this time.


-
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink
-



-

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-


<>

Re: [ACFUG Discuss] cfdocument error

2010-02-04 Thread Frank




I've experienced a few cfdocument errors in the past...

There are two things you can try that have helped me. One is to
increase the heap size of the JVM that runs CF. If you have a complex
document or one with multiple images, it can easily run out of space.

The other is to move all the processing out of the CFDOCUMENT
statement. Either create a variable and append information to it, or
just use a CFSAVECONTENT tag around all your processing. 

Example:

    


    #variables.tempdoc#


Hope this helps...
Frank

On 02/03/2010 02:48 PM, John Youngman wrote:

  
  
  perhaps the adobe renderer engine (if
that’s what it is - that’s me trying to sound all smart hahaha) is
having an issue with one or more of the characters in your output... is
there anything funny with it?
  
  
  
  
  From: Jeff Howard
  
  Sent: Wednesday, February 03, 2010 1:37 PM
  To: discussion@acfug.org
  
  Subject: Re: [ACFUG Discuss] cfdocument error
  
  
  
  
  I've had that happen before and the fix I usually found for that
was to open in a new window but that is a different issue than this. 
When that happens there is no error message associated, just a bunch of
weird characters.  The issue I am having is actually throwing an Adobe
error message that reads "the file is damaged and could not be
repaired".
   
  In my debugging process, I created the document in Flashpaper
and it is displaying.
  
  
  On Wed, Feb 3, 2010 at 2:17 PM, John
Youngman 
wrote:
  

Does it happen EVERY time? sometimes for
me, it prints out weird characters, but I do a complete refresh, and it
works...




From: Jeff
Howard 
Sent: Wednesday, February 03, 2010 1:11 PM
To: discussion@acfug.org 
Subject: [ACFUG Discuss] cfdocument error






Has anyone ever had an issue with a pdf file created with
cfdocument being corrupt?  I've tried dumping the data outside the
cfdocument and it works fine but when I simply put it in a simple tag
, the browser load really slow and then
I get an error message saying cannot display the document it is corrput.
 
Anyone ever experienced this?
 
Thanks,
Jeff




- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform


For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by FusionLink 
- 
  
  
  
- 
To unsubscribe from this list, manage your profile @ 
  http://www.acfug.org?fa=login.edituserform
  
  
For more info, see http://www.acfug.org/mailinglists
  
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
  
List hosted by FusionLink 
-





-To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserformFor more info, see http://www.acfug.org/mailinglistsArchive @ http://www.mail-archive.com/discussion%40acfug.org/List hosted by http://www.fusionlink.com-




[ACFUG Discuss] Dealing With Spiders/Bots/Crawlers

2010-02-04 Thread Bob Hendren
I'm at an odd crossroads here. Up until now, I've kept my application 
off-limits to search engines. I've used a couple of techniques found on Ben 
Nadel's blog for giving them short sessions and such. Been working well.

With respect to human users, I've been VERY diligent about using 
URLSessionFormat to keep session variables across page requests with cookies 
disabled. Also been working well.

So here's my quandary - I now want open up my application to allow search 
engines to index. However, I've got session variables embedded everywhere in my 
URLs due to URLSessionFormat()! So what's going to occur is this: the robots 
will grab all of these URLs, index them, then pass them as hijacked sessions 
through their results and I won't be able to track new visitors!

I just ran across a recent mention by Michael Dinowitz of a technique for 
setting CFID and CFToken to 1 whenever it's a bot, mentioned here:

http://www.anujgakhar.com/2010/01/26/what-is-the-best-way-to-deal-with-spidersbotscrawlers/

Bottom line: how can I make the URLs NOT pass the session management variables 
when it's a search engine?



Bob Hendren
President/CEO
ListingWare, Inc.
http://www.listingware.com
800-867-4707
bhend...@listingware.com



-

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-




RE: [ACFUG Discuss] Query or Stored Proc calling

2010-02-04 Thread Charlie Arehart
I offered my reply before seeing yours here, Derrick. Doh. But thanks for
the confidence that I'd have something to offer. :-) 

As to your last point, I don't know. I mean, sure, those who move to more
OO-like development will tend to consider options where query results are
generated in a CFC method, and in that case they may return the results in
"an actual structure of some kind (list, array, structure)", as you say, but
I don't know about asserting that it's "always better". More of a case of
different strokes, in my experience. :-) But I get your drift.

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Derrick Peavy
Sent: Thursday, February 04, 2010 10:00 AM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Query or Stored Proc calling

 

Ajas:

 

I am not an expert on how CF actually executes, but I am pretty darn sure
that the assumption you have is wrong.

 

getSomething.col1  getSomething.col2 
getSomething.col3  

 

Is not re-executing the query. Once the query is run once, assuming the
query is not in a loop itself, then it's done. It only runs once.

 

If the original coder found that there was always only a single record, then
there is no harm in the code you have. However, it's not great practice.

 

If there is any chance of ever having more than one record from that query
then your first code snip is best ( col1  col2  col3  ), and in general, is a better idea.

 

I'm sure that Charlie or someone else can chime in on how CF handles the
record set in memory and how it's referenced, etc., My guess would be that
it's always better to use structured code or an actual structure of some
kind (list, array, structure) to reference multiple record within a query. I
think the question is also similar to the old, which is better, CFLOOP or
CFOUTPUT.

 


_

Derrick Peavy

 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] cfdocument error

2010-02-04 Thread Charlie Arehart
Is this 8.01, Howard? Since you refer to images, if you may be processing
them with CFIMAGE, there's a hotfix for image processing specifically
related to problems with the resulting files, and it may be connected to
your problem. See: 

http://kb2.adobe.com/cps/403/kb403411.html

And note that while it was briefly included in CFH 3 for CF 8.01, it was no
longer after 9/16: http://kb2.adobe.com/cps/511/cpsid_51180.html

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of John Youngman
Sent: Wednesday, February 03, 2010 3:18 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] cfdocument error

 

ah there's images that might be the thing ..never used it with


 

however after a quick google, I found this:

http://www.communitymx.com/content/article.cfm?cid=C7DD6

 

does this help any?

 

From: Jeff Howard   

Sent: Wednesday, February 03, 2010 2:03 PM

To: discussion@acfug.org 

Subject: Re: [ACFUG Discuss] cfdocument error

 

Yes, essentially this is an app for expense reports.  The user uploads
images and supporting documents when submitting the expense report.  This
particular part of app is creating a pdf for the user to be able to print.
I think it might have something to do with the images.

 

When I looked closer at the Flashpaper version it seems to be getting hungup
on one of the images since it is hanging after only displaying about half
the images of receipts at this time.

 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] Query or Stored Proc calling

2010-02-04 Thread Charlie Arehart
Ajas, given your experience with CF, I'm a little confused how to reply. If
this was a brand new user, I'd say that they have things backward and even
then still misunderstood.

First, the main difference is that the code in blue would execute once for
each query result, whereas the code in red would execute only once, for the
first record in the result set. Also, you go on to refer to things in terms
of "executing the query" more than once, but that never happens in either
example. The query is executed only once (unless the cfquery itself us
somehow in another loop). The difference is only a matter of whether the
query's results are looped over (first example) or not (second example).

Second, it seems that you're maybe thinking that the use of the queryname
before the column name has some affect on how many records are processed,
but it does not. It's simply that if (in the first example) you're in a
CFQUERY output loop, the queryname is optional (though recommended) as CF
can figure out that the varname is a reference to a query column name
because the queryname becomes a sort of default scope for the life of the
query loop. But in the plain cfoutput (the second example, which is not a
loop), then the queryname is not a part of the normal scope search, so CF
would not know that the variable references were query columns, so you must
provide them.

Finally, none of this changes if it's a cfstoredproc/cfprocresult or a
cfquery. 

Does that help? Or is there something more to your question that I'm not
seeing? 

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Ajas Mohammed
Sent: Wednesday, February 03, 2010 10:21 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Query or Stored Proc calling

 

Hi,

I came across code like this


   select col1,col2,col3 from tbl where condition


Now, instead of using  col1  col2  col3  ,
the code uses getSomething.col1  getSomething.col2 
getSomething.col3  

The code in blue would do ONLY ONE CALL to query and display results.

My take is that, the code in red is executing the query every time col1 thru
col3 are referenced with query name. Is this correct? Also if getSomething
was a cfprocresult name, the stored proc would be executed for every
reference to stored proc name.colname right?

Thanks,


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] cfdocument error

2010-02-04 Thread Charlie Arehart
Yep, sometimes it's a browser caching thing. Try adding a querystring with
random numbers to the page to force a browser refresh (?xyz, for instance).

 

/charlie

 

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of John Youngman
Sent: Wednesday, February 03, 2010 2:17 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] cfdocument error

 

Does it happen EVERY time? sometimes for me, it prints out weird characters,
but I do a complete refresh, and it works...

 

From: Jeff Howard   

Sent: Wednesday, February 03, 2010 1:11 PM

To: discussion@acfug.org 

Subject: [ACFUG Discuss] cfdocument error

 

Has anyone ever had an issue with a pdf file created with cfdocument being
corrupt?  I've tried dumping the data outside the cfdocument and it works
fine but when I simply put it in a simple tag , the
browser load really slow and then I get an error message saying cannot
display the document it is corrput.

 

Anyone ever experienced this?

 

Thanks,

Jeff


- 
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink   
- 




-
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



Re: [ACFUG Discuss] Query or Stored Proc calling

2010-02-04 Thread Ajas Mohammed
Thanks Teddy and Derrick.

Good to know that I was wrong in my assumption. I felt
getSomething.col1
 getSomething.col2  getSomething.col3   is an
overkill but apparently not.

Thanks,


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.


On Thu, Feb 4, 2010 at 10:22 AM, Teddy R. Payne wrote:

> Ajas,
> I am not sure what you are looking for here.
>
> Given your example:
>
> 
>select col1,col2,col3 from tbl where condition
> 
>
> If you perform:
>
> #getSomething.col1#
>
> You will get back "col1" from the first record.  The call to the database
> does not occur in the cfoutput.  The call happens in the  and will
> stay available for the life of template execution.
>
> As for stored procedures, you can call stored procedures within 
> using syntax for your associated RDMS(EXEC...etc).  I have not been a fan of
> that practice as I typically favor .  If you need multiple
> result sets,  has a "resultset" attribute that you can assign.
> "Resultset" is an integer and it refers to the logically produced data sets
> in your stored procedure from top to bottom in that order.
>
> As with above,  does not call the stored procedure.  The stored
> procedure would be called within  or  and stored in
> the variables scope unless otherwise created.   can "bind" to a
> query using the "query" attribute of  to the resultset of a
> storedprocedure or a query by the reference to the name of the result set or
> query name, but only in the sense of outputting the information stored in
> the returned data that is stored in the variable.
>
>
> Teddy R. Payne, ACCFD
> Google Talk - teddyrpa...@gmail.com
>
>
>
>
> On Wed, Feb 3, 2010 at 10:20 PM, Ajas Mohammed  wrote:
>
>> Hi,
>>
>> I came across code like this
>>
>> 
>>select col1,col2,col3 from tbl where condition
>> 
>>
>> Now, instead of using  col1  col2
>>  col3  ,
>> the code uses getSomething.col1  getSomething.col2 
>> getSomething.col3  
>>
>> The code in blue would do ONLY ONE CALL to query and display results.
>>
>> My take is that, the code in red is executing the query every time col1
>> thru col3 are referenced with query name. Is this correct? Also if
>> getSomething was a cfprocresult name, the stored proc would be executed
>> for every reference to stored proc name.colname right?
>>
>> Thanks,
>>
>> 
>> http://ajashadi.blogspot.com
>> We cannot become what we need to be, remaining what we are.
>> No matter what, find a way. Because thats what winners do.
>> You can't improve what you don't measure.
>> Quality is never an accident; it is always the result of high intention,
>> sincere effort, intelligent direction and skillful execution; it represents
>> the wise choice of many alternatives.
>>
>
>


Re: [ACFUG Discuss] Query or Stored Proc calling

2010-02-04 Thread Teddy R. Payne
Ajas,
I am not sure what you are looking for here.

Given your example:

   select col1,col2,col3 from tbl where condition


If you perform:

#getSomething.col1#

You will get back "col1" from the first record.  The call to the database
does not occur in the cfoutput.  The call happens in the  and will
stay available for the life of template execution.

As for stored procedures, you can call stored procedures within 
using syntax for your associated RDMS(EXEC...etc).  I have not been a fan of
that practice as I typically favor .  If you need multiple
result sets,  has a "resultset" attribute that you can assign.
"Resultset" is an integer and it refers to the logically produced data sets
in your stored procedure from top to bottom in that order.

As with above,  does not call the stored procedure.  The stored
procedure would be called within  or  and stored in
the variables scope unless otherwise created.   can "bind" to a
query using the "query" attribute of  to the resultset of a
storedprocedure or a query by the reference to the name of the result set or
query name, but only in the sense of outputting the information stored in
the returned data that is stored in the variable.


Teddy R. Payne, ACCFD
Google Talk - teddyrpa...@gmail.com



On Wed, Feb 3, 2010 at 10:20 PM, Ajas Mohammed  wrote:

> Hi,
>
> I came across code like this
>
> 
>select col1,col2,col3 from tbl where condition
> 
>
> Now, instead of using  col1  col2  /> col3  ,
> the code uses getSomething.col1  getSomething.col2 
> getSomething.col3  
>
> The code in blue would do ONLY ONE CALL to query and display results.
>
> My take is that, the code in red is executing the query every time col1
> thru col3 are referenced with query name. Is this correct? Also if
> getSomething was a cfprocresult name, the stored proc would be executed
> for every reference to stored proc name.colname right?
>
> Thanks,
>
> 
> http://ajashadi.blogspot.com
> We cannot become what we need to be, remaining what we are.
> No matter what, find a way. Because thats what winners do.
> You can't improve what you don't measure.
> Quality is never an accident; it is always the result of high intention,
> sincere effort, intelligent direction and skillful execution; it represents
> the wise choice of many alternatives.
>


Re: [ACFUG Discuss] Query or Stored Proc calling

2010-02-04 Thread Derrick Peavy

Ajas:

I am not an expert on how CF actually executes, but I am pretty darn  
sure that the assumption you have is wrong.


getSomething.col1  getSomething.col2   
getSomething.col3  


Is not re-executing the query. Once the query is run once, assuming  
the query is not in a loop itself, then it's done. It only runs once.


If the original coder found that there was always only a single  
record, then there is no harm in the code you have. However, it's not  
great practice.


If there is any chance of ever having more than one record from that  
query then your first code snip is best (query="getSomething"> col1  col2  col3  cfoutput>), and in general, is a better idea.


I'm sure that Charlie or someone else can chime in on how CF handles  
the record set in memory and how it's referenced, etc., My guess would  
be that it's always better to use structured code or an actual  
structure of some kind (list, array, structure) to reference multiple  
record within a query. I think the question is also similar to the  
old, which is better, CFLOOP or CFOUTPUT.



_
Derrick Peavy
derr...@derrickpeavy.com
404-786-5036

“Innovation distinguishes between a leader and a follower.” -Steve Jobs

"A good deal that used to be a great deal, is not nearly as good as an  
awful deal that was once a horrible deal." - Dan Gilbert, http://bit.ly/8gUruX

_



On Feb 3, 2010, at 10:20 PM, Ajas Mohammed wrote:


Hi,

I came across code like this


   select col1,col2,col3 from tbl where condition


Now, instead of using  col1   
col2  col3  ,
the code uses getSomething.col1  getSomething.col2  
 getSomething.col3  


The code in blue would do ONLY ONE CALL to query and display results.

My take is that, the code in red is executing the query every time  
col1 thru col3 are referenced with query name. Is this correct? Also  
if getSomething was a cfprocresult name, the stored proc would be  
executed for every reference to stored proc name.colname right?


Thanks,


http://ajashadi.blogspot.com
We cannot become what we need to be, remaining what we are.
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high  
intention, sincere effort, intelligent direction and skillful  
execution; it represents the wise choice of many alternatives.