Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Rodney Chang
This is ugly and uses T-SQL syntax but you get the idea.

SELECT id
FROM (
SELECT id, CAST(
CAST(year AS varchar)
+ '-' + CAST(CASE month WHEN 0 THEN 1 ELSE month END AS varchar)
+ '-' + CAST(CASE day WHEN 0 THEN 1 ELSE day END AS varchar)
AS datetime) as realdate
FROM aaa
) tmpT
WHERE realdate BETWEEN '2006-01-01' AND '2007-05-05'



On Mon, Mar 24, 2008 at 4:06 PM, Les Mizzell <[EMAIL PROTECTED]> wrote:

> I've got a database in which dates are stored as integers in three
> separate columns as: day|month|year
>
> This was done because the client wished to create records that could
> contain only a year, or just a year and month, or year, month, and day,
> or no date at all. Values in the columns default to "0" if nothing was
> entered.
>
> Bad idea. Really bad idea! Worked great at first, but as 'feature creep"
> has slowly reared its ugly head, this way of storing dates has caused me
> no end of headaches. They want to add a date search by range. So, you'd
> want to do something like:
>
> and YEAR >= #form.from_y# and YEAR <= #form.to_y#
> and MONTH >= #form.from_m# and MONTH <= #form.to_m#
> and DAY >= #form.from_d# and DAY <= #form.to_d#
>
> So, let's say you have four records
>
> day|month|year
> 15 | 05  |2005
> 16 | 04  |2006
> 15 | 03  |2007
>  0 | 01  |2006
>
>
> Uh oh - that's not going to work. For example, searching for dates
> between 05/15/2006 and 04/16/2007 is looking at *integers* in the month
> column greater than 5 *and* less than 4, plus integers in the day column
> greater then 15 but less than 16. Whoops, no results returned.
>
> I've gotten myself into this mess. Is there any trick I can use in the
> queries to get myself out, or am a @[EMAIL PROTECTED]
>
> I should have NEVER let them talk me into letting them enter records
> without *complete* dates - but, the client is always right, huh? But,
> that was almost a year ago and they weren't asking for a date range
> search at the time either..
>
> Argh!
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301990
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: String function question

2008-03-24 Thread Bruce Sorge
Let me put something together and I will send it to you.

C S wrote:
>> Original code: newValue was being created inside the cfif's, but was 
>> not there in the last CFSET. 
>> 
>
> You are right. It should before the cfif. 
>
>   
>> Also, form.FieldNames were not being found 
>> until I added the loop before the CFIF's.
>> 
>
> That should not happen. As long as the form was submitted, I believe the 
> form.fieldNames variable should always exist. Also the extra loop is not 
> needed and may even produce the wrong results. 
>
>   
>> What I get though are x's in  the first column only if the 
>> first column stayed selected. 
>> 
>
> I think the previous code should work. At least once you get rid of the extra 
> loop and move the newValue variable declaration. But maybe I am not 
> understanding what you mean by "columns". Any way you can provide a small 
> example?
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301989
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: String function question

2008-03-24 Thread C S
> Original code: newValue was being created inside the cfif's, but was 
> not there in the last CFSET. 

You are right. It should before the cfif. 

> Also, form.FieldNames were not being found 
> until I added the loop before the CFIF's.

That should not happen. As long as the form was submitted, I believe the 
form.fieldNames variable should always exist. Also the extra loop is not needed 
and may even produce the wrong results. 

> What I get though are x's in  the first column only if the 
> first column stayed selected. 

I think the previous code should work. At least once you get rid of the extra 
loop and move the newValue variable declaration. But maybe I am not 
understanding what you mean by "columns". Any way you can provide a small 
example?


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301988
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Google geocoder and CF5

2008-03-24 Thread Dave Watts
> Has anyone succeeded getting the Google geocoder to work underCF5?
> I have my API working fine under CFMX, but under CF5 Google 
> keeps returning code=610 meaning "invalid key".
> My API calls the geocoder through CFHTTP.

My guess is that it's an encoding problem. Use an HTTP sniffer/recording
proxy/whatever to see what's different.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301987
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Is it a CF8 BUG? Very strange CFGRID format = HTML error!

2008-03-24 Thread Ali
Hi:
This is very strange. The FGRID works fine when I choose Format = Applet but
when I choose Format = HTML and I don't choose anything on the GRID and
press submit button the following error returns!
The cfgridupdate tag cannot find the grid named MyGrid When I choose a grid
cell and edit it and then press submit button no error occurs and the
CFgridupdate works just fine but when I click outside of the grid or edit
nothing in the page and I press the submit button the error returns.
Strange because I have no such a problem when I choose applet. Is this a CF8
bug or I have to set something and I don't.

the page is not complicated at all. It is the simple grid code:



SELECT *
FROM Tbl_Users


SELECT *
FROM Tbl_City












   


  

   





  



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301986
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Nate Willard
Thanks bobby. This ensures words are not cut in half, not sentences correct? Or 
did I miss something?

Thanks

Bobby Hartsfield <[EMAIL PROTECTED]> wrote: Been using this forever.
 
Author: Bobby Hartsfield | [EMAIL PROTECTED]
File: trimtext.cfm
Description: This tag will take the text passed to it and create a "teaser"
 Meaning, it will trim the text back and add a trailing ... to
the end 
Making for a good teaser news article with a "read
more" link.

Give the tag the text to trim and the number of
characters to trim it at
it will trim to that specified number and work its
way "BACK" to the first 
space character and add ...

--->







the "Trimat" attribute --->
 
  
  attribute ---> 
  

 
  any words in half--->  
  listlen(Cutparagraph, " "), " ")>
  #finalparagraph#...
 
  trimat specifications display it without any editing ---> 
  #paragraph#
 




-Original Message-
From: Nate Willard [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 7:23 PM
To: CF-Talk
Subject: Re: Perhaps a little over complicated - Dissecting a String

These are all good steps in the right direction however, I haven't found
anything that ties all this logic together. 

Logic
if first sentence is between 200-250 characters show that setence
if no sentence, show first 250 characters +...
if first sentence is less than 250 sentences, get as many sentences as
possible before hitting 250 characters and output.

Has anyone built something like this?

Thanks

Steve Bryant  wrote: I think you want:
#Left(ListFirst(string,"."),100)#.
(untested)

> Instead of returning say just 100 characters. Is there a way to return 
> the first sentence only if its under 100 characters, and if not then 
> 100 characters resulting in a cut off string. 







~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301985
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Bobby Hartsfield
Been using this forever.
 











  



   

#finalparagraph#...

 
#paragraph#





-Original Message-
From: Nate Willard [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 7:23 PM
To: CF-Talk
Subject: Re: Perhaps a little over complicated - Dissecting a String

These are all good steps in the right direction however, I haven't found
anything that ties all this logic together. 

Logic
if first sentence is between 200-250 characters show that setence
if no sentence, show first 250 characters +...
if first sentence is less than 250 sentences, get as many sentences as
possible before hitting 250 characters and output.

Has anyone built something like this?

Thanks

Steve Bryant <[EMAIL PROTECTED]> wrote: I think you want:
#Left(ListFirst(string,"."),100)#.
(untested)

> Instead of returning say just 100 characters. Is there a way to return 
> the first sentence only if its under 100 characters, and if not then 
> 100 characters resulting in a cut off string. 





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301984
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: How to limit this query to 1 photo per community?

2008-03-24 Thread Rick Faircloth
Go it... just needed to add:

group by nc.new_community_name

before the order by clause

Thanks for your assistance!

Rick

> -Original Message-
> From: Bruce Sorge [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2008 8:55 PM
> To: CF-Talk
> Subject: Re: How to limit this query to 1 photo per community?
> 
> This should work:
> 
> select TOP (1) nc.new_community_id, nc.new_community_name, 
> nc.new_community_short_desc,
>   ncp.new_community_photo_w150, ncp.new_community_photo_w500
> from new_communities nc, new_community_photos ncp
> where nc.new_community_id = ncp.new_community_id
> order by nc.new_community_name
> 
> 
> Bruce
> 
> Rick Faircloth wrote:
> > This seems like it ought to be simple, but I'm not
> > quite seeing the solution.
> >
> > How would I adjust this query to select one community
> > from the new_communities table
> > and only the *first* photo from the new_community_photos table.
> >
> > Right now I get the community as many times as there are photos for it.
> >
> > I want *one* community and *one* matching photo.
> >
> > Here's what I put together and then realized the problem...
> >
> > select nc.new_community_id, nc.new_community_name, 
> > nc.new_community_short_desc,
> > ncp.new_community_photo_w150, ncp.new_community_photo_w500
> > from new_communities nc, new_community_photos ncp
> > where nc.new_community_id = ncp.new_community_id
> > order by nc.new_community_name
> >
> > ???
> >
> > Thanks,
> >
> > Rick
> >
> >
> 
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301983
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How to limit this query to 1 photo per community?

2008-03-24 Thread Bruce Sorge
Ahh, sorry about that. I am not very good with MySql so I am afraid I 
can't be of more assistance.

Bruce

Rick Faircloth wrote:
> Hi, Bruce and thanks for the reply.
>
> TOP (1) isn't working.  From what I can tell, that's an MSSQL
> function and MySQL (sorry, should have specified db) doesn't use it.
> MySQL uses Limit 1 for that functionality, but in this case, I don't
> want to get just the first community, but every community, but only the
> first photo in the db for each community.
>
> I've tried using join, but haven't hit upon the correct syntax, yet.
>
> Any other ideas?
>
> Rick
>   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301982
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Google geocoder and CF5

2008-03-24 Thread Claude Schneegans
 >>Show us your code.

Well the code works under CF 7 and not with CF5, so I suspect it is 
something like Google expecting UTF-8 in headers
or something like that.
Any way, the code is:
http://maps.google.com/maps/geo?q=#q#&output=xml&key=#googleKey#"; 
METHOD="GET" RESOLVEURL="false">
I doubt it tells you a lot.
And YES, the key is correct, the module to display the map works fine, 
using the same key.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301981
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: String function question

2008-03-24 Thread Bruce Sorge
Yes I did. Had to make some changes though. Still did not produce the 
desired result. Here is what I did:

Original code: newValue was being created inside the cfif's, but was not 
there in the last CFSET. Also, form.FieldNames were not being found 
until I added the loop before the CFIF's. What I get though are x's in 
the first column only if the first column stayed selected. Once I 
selected one of the other two coluns, all fields are blank. And the text 
fields are always blank.


]*>","","ALL")>
]*>', NewContentBlock)>



 




















Changed code:



   




   
   
   
 











  
   
  
   


 --->

C S wrote:
> Did you ever try my last suggestion. It is not ideal, but it should work. 
>   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301980
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: How to limit this query to 1 photo per community?

2008-03-24 Thread Rick Faircloth
Hi, Bruce and thanks for the reply.

TOP (1) isn't working.  From what I can tell, that's an MSSQL
function and MySQL (sorry, should have specified db) doesn't use it.
MySQL uses Limit 1 for that functionality, but in this case, I don't
want to get just the first community, but every community, but only the
first photo in the db for each community.

I've tried using join, but haven't hit upon the correct syntax, yet.

Any other ideas?

Rick

> -Original Message-
> From: Bruce Sorge [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2008 8:55 PM
> To: CF-Talk
> Subject: Re: How to limit this query to 1 photo per community?
> 
> This should work:
> 
> select TOP (1) nc.new_community_id, nc.new_community_name, 
> nc.new_community_short_desc,
>   ncp.new_community_photo_w150, ncp.new_community_photo_w500
> from new_communities nc, new_community_photos ncp
> where nc.new_community_id = ncp.new_community_id
> order by nc.new_community_name
> 
> 
> Bruce
> 
> Rick Faircloth wrote:
> > This seems like it ought to be simple, but I'm not
> > quite seeing the solution.
> >
> > How would I adjust this query to select one community
> > from the new_communities table
> > and only the *first* photo from the new_community_photos table.
> >
> > Right now I get the community as many times as there are photos for it.
> >
> > I want *one* community and *one* matching photo.
> >
> > Here's what I put together and then realized the problem...
> >
> > select nc.new_community_id, nc.new_community_name, 
> > nc.new_community_short_desc,
> > ncp.new_community_photo_w150, ncp.new_community_photo_w500
> > from new_communities nc, new_community_photos ncp
> > where nc.new_community_id = ncp.new_community_id
> > order by nc.new_community_name
> >
> > ???
> >
> > Thanks,
> >
> > Rick
> >
> >
> 
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301979
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Claude Schneegans
>>Try searching for dates between 10/15/2006 and 04/14/2007
>>See the problem?

Yeah, my answer was a bit too easy ;-)


-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301978
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Google geocoder and CF5

2008-03-24 Thread Adrian Lynch
Show us your code.

Adrian

-Original Message-
From: Claude Schneegans
Sent: 24 March 2008 23:32
To: CF-Talk
Subject: Google geocoder and CF5


Hi,

Has anyone succeeded getting the Google geocoder to work underCF5?
I have my API working fine under CFMX, but under CF5 Google keeps 
returning code=610
meaning "invalid key".
My API calls the geocoder through CFHTTP.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301977
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread C S
>The problem with that is the same problem as the previous example I 
>posted though.
>
>Try searching for dates between 10/15/2006 and 04/14/2007

Given those search dates, how do you want to handle records with a year only 
(2006 or 2007). Same question for the month. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301976
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: String function question

2008-03-24 Thread C S
>The biggest problem I am having is getting the columns for the form to 
>line up properly (they are a series of radio buttons). I can get all of 
>the values and the text fields fill in properly. The radio button values 
>fill in with what I select, just not in the correct column.

Did you ever try my last suggestion. It is not ideal, but it should work. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301975
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Les Mizzell
denstar wrote:
> Are they against letting you add a real date field?

Seeing there's already several hundred records in the database, some 
with dates, some with NONE - which is exactly what they want - adding a 
real date field would be tough. It was a hard argument to start with, 
and I let them win.

> Perhaps add a date field, and then make some magic that turns those integers
> into dates.

Yea - but how do you turn 0/0/2007 into a valid date? And *what* date do 
you turn it into if you replaced the "0" values with something else? And 
what if they don't enter a year at all? 0/0/0??? Ack!

But - see my other email. I've had an idea while watching "House"!! 
Sometimes getting out from in front of the computer is the best way to 
find a solution (maybe - haven't tried it yet)!!


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301974
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates - IDEA!!!

2008-03-24 Thread Les Mizzell
Ahhh- here's an idea!

OK, in theory...
Let's just look at just the month for starters...

form.startMONTH
form.endMONTH

Each has a value of 1 - 12
but, let's use that as LIST START AND END POSITIONS

Set a list containing 2 years worth of months:



form.startMONTH would equal the starting position in the list

(form.endMONTH + 12) would be the ending position in the list


Search for anything in between. How's that?

What's the easiest way to search for values in a list starting at 
position X and ending at position Y?






~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301973
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread denstar
Are they against letting you add a real date field?

I've been there, in spades, and there's always a way through.  Sometimes
it's a lot easier, and not as much fun, as banging your head against the
same angle of attack for hours tho.  :-)

Perhaps add a date field, and then make some magic that turns those integers
into dates.

And THEN do the query.

Not as cool as one fell swoop (although if you're good at your SQL dialect,
crazy queries like that ARE possible),
but still.

force be with you,
:denny


On Mon, Mar 24, 2008 at 6:07 PM, Les Mizzell <[EMAIL PROTECTED]> wrote:

> Claude Schneegans wrote:
> > How about:
> >  and YEAR >= #form.from_y# and YEAR <= #form.to_y#
> >  and ((MONTH >= #form.from_m# and MONTH <= #form.to_m#) OR MONTH=0)
> >  and ((DAY >= #form.from_d# and DAY <= #form.to_d#) OR DAY=0)
>
> The problem with that is the same problem as the previous example I
> posted though.
>
> Try searching for dates between 10/15/2006 and 04/14/2007
>
> See the problem?
>
>
> Yup, I've scr*wed myself on this one I believe!
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301972
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to limit this query to 1 photo per community?

2008-03-24 Thread Bruce Sorge
This should work:

select TOP (1) nc.new_community_id, nc.new_community_name, 
nc.new_community_short_desc,
ncp.new_community_photo_w150, ncp.new_community_photo_w500
from new_communities nc, new_community_photos ncp
where nc.new_community_id = ncp.new_community_id
order by nc.new_community_name


Bruce

Rick Faircloth wrote:
> This seems like it ought to be simple, but I'm not
> quite seeing the solution.
>
> How would I adjust this query to select one community
> from the new_communities table
> and only the *first* photo from the new_community_photos table.
>
> Right now I get the community as many times as there are photos for it.
>
> I want *one* community and *one* matching photo.
>
> Here's what I put together and then realized the problem...
>
> select nc.new_community_id, nc.new_community_name, 
> nc.new_community_short_desc,
>   ncp.new_community_photo_w150, ncp.new_community_photo_w500
> from new_communities nc, new_community_photos ncp
> where nc.new_community_id = ncp.new_community_id
> order by nc.new_community_name
>
> ???
>
> Thanks,
>
> Rick
>
>   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301971
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


How to limit this query to 1 photo per community?

2008-03-24 Thread Rick Faircloth
This seems like it ought to be simple, but I'm not
quite seeing the solution.

How would I adjust this query to select one community
from the new_communities table
and only the *first* photo from the new_community_photos table.

Right now I get the community as many times as there are photos for it.

I want *one* community and *one* matching photo.

Here's what I put together and then realized the problem...

select nc.new_community_id, nc.new_community_name, nc.new_community_short_desc,
ncp.new_community_photo_w150, ncp.new_community_photo_w500
from new_communities nc, new_community_photos ncp
where nc.new_community_id = ncp.new_community_id
order by nc.new_community_name

???

Thanks,

Rick


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301970
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Les Mizzell
Claude Schneegans wrote:
> How about:
>  and YEAR >= #form.from_y# and YEAR <= #form.to_y#
>  and ((MONTH >= #form.from_m# and MONTH <= #form.to_m#) OR MONTH=0)
>  and ((DAY >= #form.from_d# and DAY <= #form.to_d#) OR DAY=0)

The problem with that is the same problem as the previous example I 
posted though.

Try searching for dates between 10/15/2006 and 04/14/2007

See the problem?


Yup, I've scr*wed myself on this one I believe!


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301969
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Josh Nathanson
> I'd been trying to come up with a way to do this, but the columns with a
> "0" in them are throwing me off, since "0" isn't a valid date value.

You could use CASE or IF to fill in dummy values for those zeroes, but then, 
if you substituted 1 (January) for the month for example, it wouldn't be 
found in a date range search from Feb - April for example.

If a record only has the year entered, for example 2007, I suppose you'd 
want to return it for any search that had 2007 in the date range.  So maybe 
you could do a conditional check for that in the subquery, and then return 
any of those records that match the year -- something like
CASE WHEN day = 0 and month = 0 and year <> 0 then 'true' else 'false' END
AS 'matchonlyyear'
Then maybe do a query of queries or something to check for those "year only" 
records.

All I can say is you are going to have to get super creative and pull out 
all the stops.

-- Josh



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301968
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Claude Schneegans
How about:
 and YEAR >= #form.from_y# and YEAR <= #form.to_y#
 and ((MONTH >= #form.from_m# and MONTH <= #form.to_m#) OR MONTH=0)
 and ((DAY >= #form.from_d# and DAY <= #form.to_d#) OR DAY=0)

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301967
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Les Mizzell
> I'd been trying to come up with a way to do this, but the columns with a 
> "0" in them are throwing me off, since "0" isn't a valid date value.

and I might add - it was put a "0" in there, or allow a null, which 
would have been worse...

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301966
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Les Mizzell
> The idea being to parse the separate date columns into usable dates in the 
> subquery, and then join that to the superquery as needed.

I'd been trying to come up with a way to do this, but the columns with a 
"0" in them are throwing me off, since "0" isn't a valid date value.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301965
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Josh Nathanson
You might be able to join the table to itself in a query, and on that join 
concat your date integers into actual date values.

Something like...

SELECT whatever
FROM thetable t
INNER JOIN ( SELECT id, CONCAT(yearcol,'/',monthcol,'/',daycol) AS gooddate
FROM thetable
) gooddates
ON t.id = gooddates.id
WHERE gooddates.gooddate BETWEEN datea AND dateb

The idea being to parse the separate date columns into usable dates in the 
subquery, and then join that to the superquery as needed.

That syntax may or may not work in your db, the example above would be for 
MySQL.

-- Josh



- Original Message - 
From: "Les Mizzell" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Monday, March 24, 2008 4:06 PM
Subject: Date Range Search Problem - when it's integers stored and not dates


> I've got a database in which dates are stored as integers in three
> separate columns as: day|month|year
>
> This was done because the client wished to create records that could
> contain only a year, or just a year and month, or year, month, and day,
> or no date at all. Values in the columns default to "0" if nothing was
> entered.
>
> Bad idea. Really bad idea! Worked great at first, but as 'feature creep"
> has slowly reared its ugly head, this way of storing dates has caused me
> no end of headaches. They want to add a date search by range. So, you'd
> want to do something like:
>
> and YEAR >= #form.from_y# and YEAR <= #form.to_y#
> and MONTH >= #form.from_m# and MONTH <= #form.to_m#
> and DAY >= #form.from_d# and DAY <= #form.to_d#
>
> So, let's say you have four records
>
> day|month|year
> 15 | 05  |2005
> 16 | 04  |2006
> 15 | 03  |2007
>  0 | 01  |2006
>
>
> Uh oh - that's not going to work. For example, searching for dates
> between 05/15/2006 and 04/16/2007 is looking at *integers* in the month
> column greater than 5 *and* less than 4, plus integers in the day column
> greater then 15 but less than 16. Whoops, no results returned.
>
> I've gotten myself into this mess. Is there any trick I can use in the
> queries to get myself out, or am a @[EMAIL PROTECTED]
>
> I should have NEVER let them talk me into letting them enter records
> without *complete* dates - but, the client is always right, huh? But,
> that was almost a year ago and they weren't asking for a date range
> search at the time either..
>
> Argh!
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301964
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Google geocoder and CF5

2008-03-24 Thread Claude Schneegans
Hi,

Has anyone succeeded getting the Google geocoder to work underCF5?
I have my API working fine under CFMX, but under CF5 Google keeps 
returning code=610
meaning "invalid key".
My API calls the geocoder through CFHTTP.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301963
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Nate Willard
These are all good steps in the right direction however, I haven't found 
anything that ties all this logic together. 

Logic
if first sentence is between 200-250 characters show that setence
if no sentence, show first 250 characters +...
if first sentence is less than 250 sentences, get as many sentences as possible 
before hitting 250 characters and output.

Has anyone built something like this?

Thanks

Steve Bryant <[EMAIL PROTECTED]> wrote: I think you want:
#Left(ListFirst(string,"."),100)#.
(untested)

> Instead of returning say just 100 characters. Is there a way to return 
> the first sentence only if its under 100 characters, and if not then 
> 100 characters resulting in a cut off string. 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301962
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Date Range Search Problem - when it's integers stored and not dates

2008-03-24 Thread Les Mizzell
I've got a database in which dates are stored as integers in three 
separate columns as: day|month|year

This was done because the client wished to create records that could 
contain only a year, or just a year and month, or year, month, and day, 
or no date at all. Values in the columns default to "0" if nothing was 
entered.

Bad idea. Really bad idea! Worked great at first, but as 'feature creep" 
has slowly reared its ugly head, this way of storing dates has caused me 
no end of headaches. They want to add a date search by range. So, you'd 
want to do something like:

 and YEAR >= #form.from_y# and YEAR <= #form.to_y#
 and MONTH >= #form.from_m# and MONTH <= #form.to_m#
 and DAY >= #form.from_d# and DAY <= #form.to_d#

So, let's say you have four records

day|month|year
15 | 05  |2005
16 | 04  |2006
15 | 03  |2007
  0 | 01  |2006


Uh oh - that's not going to work. For example, searching for dates 
between 05/15/2006 and 04/16/2007 is looking at *integers* in the month 
column greater than 5 *and* less than 4, plus integers in the day column 
greater then 15 but less than 16. Whoops, no results returned.

I've gotten myself into this mess. Is there any trick I can use in the 
queries to get myself out, or am a @[EMAIL PROTECTED]

I should have NEVER let them talk me into letting them enter records 
without *complete* dates - but, the client is always right, huh? But, 
that was almost a year ago and they weren't asking for a date range 
search at the time either..

Argh!


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301961
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: String function question

2008-03-24 Thread Bruce Sorge
The biggest problem I am having is getting the columns for the form to 
line up properly (they are a series of radio buttons). I can get all of 
the values and the text fields fill in properly. The radio button values 
fill in with what I select, just not in the correct column.

Bruce

Charlie Griefer wrote:
> so just out of curiosity... the backreferences thing didn't pan out at all?
>
> On Mon, Mar 24, 2008 at 3:17 PM, Bruce Sorge <[EMAIL PROTECTED]> wrote:
>   
>> Appreciate it. I will give it a try.
>>
>>
>>  denstar wrote:
>>  > This is probably too late to help, but I did a similar hackish job:
>>  >
>>  > 
>>  > #thisForm.editForm(url.formnum)#
>>  > 
>>  > 
>>  > contents = rereplace(thisForm,"]*>(.*?)",">  > style='background-color:silver;'>\1","all");
>>  > contents = rereplace(contents,']+text[^>]+value[
>>  > =]+["'']([^"]*)[^>]+>',">  > style='background-color:silver;'>\1","all");
>>  > contents = rereplacenocase(contents,"(.*?)","","all");
>>  > 
>>  >
>>  > The cfsavecontent contains the rendered form, with values, and I just
>>  > chopped the inputs off the values, basically, leaving the value there
>>  > "alone".
>>  >
>>  > The select box stuff was commented out, so I bet I never got that 
>> working...
>>  > this is a nasty way of doing things, but worked for what it was needed 
>> for.
>>  >
>>  > Figured I'd put the code out there, anyways. *shrug*  =]
>>  >
>>  > -denny
>>  >
>>  >
>>  >
>>
>>
>>
>> 
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301960
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Using CFWindow getting the parent page to refresh

2008-03-24 Thread Don L
>Don,
>
>OK.  On the home page of a portal users click on an icon and launch a report
>in a separate browser instance.  At the top of the report there's a link
>that launches a cfwindow that allows them to filter the report and select
>how they want it sorted.  Their choices are saved to the database when the
>form submits so they don't need to make the setting each time they launch
>the report.
>
>After saving their selections to the database I hide the window and refresh
>the report.  However although the page does refresh it brings up the
>original version, not the one reflecting the filter or sort changes they
>just saved.
>
>Here's the function that runs when the form is submitted:
>
>
>function submitmyform() {
>
>ColdFusion.Ajax.submitForm('cfformid', 'myreport.cfm'
>
>);
>
>ColdFusion.Window.hide('cfwindowname');
>
>location.reload();
>
>
>
>Rick Mason
>

Ok, Rick,  I think I see what you intend to do now.  My understanding is 
currently to reload a cfwindow to its current "space" one would need to use 
AJAXLINK, in you case, one way to make it work would be to use FORM method of 
Get instead of the usual "Post", and now you can pass the parameters via 
URLs...  Are you with me?

Another possibility, use cfajaxproxy and javascript library call and cfc to 
write new filter values to db in the background upon a js event trigger, then, 
reload this window using AJAXLINK... (imho, this approach is very powerful and 
flexible...but needs more effort...)

hih

Don





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301959
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Charlie Griefer
bear in mind the previous suggestions (while not incorrect) will
potentially cut off a word in the middle.  cflib.org has a few UDFs
that will make sure you return whole words.

http://cflib.org/udf.cfm?ID=1106
http://cflib.org/udf.cfm?ID=832
http://cflib.org/udf.cfm?ID=329

 and more :)

On Mon, Mar 24, 2008 at 4:29 PM, Steve Bryant
<[EMAIL PROTECTED]> wrote:
> I think you want:
>  #Left(ListFirst(string,"."),100)#.
>  (untested)
>
>
>  > Instead of returning say just 100 characters. Is there a way to return
>  > the first sentence only if its under 100 characters, and if not then
>  > 100 characters resulting in a cut off string.
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301958
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: String function question

2008-03-24 Thread Charlie Griefer
so just out of curiosity... the backreferences thing didn't pan out at all?

On Mon, Mar 24, 2008 at 3:17 PM, Bruce Sorge <[EMAIL PROTECTED]> wrote:
> Appreciate it. I will give it a try.
>
>
>  denstar wrote:
>  > This is probably too late to help, but I did a similar hackish job:
>  >
>  > 
>  > #thisForm.editForm(url.formnum)#
>  > 
>  > 
>  > contents = rereplace(thisForm,"]*>(.*?)","  > style='background-color:silver;'>\1","all");
>  > contents = rereplace(contents,']+text[^>]+value[
>  > =]+["'']([^"]*)[^>]+>',"  > style='background-color:silver;'>\1","all");
>  > contents = rereplacenocase(contents,"(.*?)","","all");
>  > 
>  >
>  > The cfsavecontent contains the rendered form, with values, and I just
>  > chopped the inputs off the values, basically, leaving the value there
>  > "alone".
>  >
>  > The select box stuff was commented out, so I bet I never got that 
> working...
>  > this is a nasty way of doing things, but worked for what it was needed for.
>  >
>  > Figured I'd put the code out there, anyways. *shrug*  =]
>  >
>  > -denny
>  >
>  >
>  >
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301957
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Where is jar.exe?

2008-03-24 Thread Nathan Strutz
Yeah I don't think it comes with CF, strangely. Especially with Enterprise
edition, you'd think it might. It's actually bundled with the JDK as opposed
to the plain JRE that comes with CF. The JDK contains the JRE as well, so
you'll get some redundancy unless you delete your CF jre folder and point
your CF server to use your JDK's included JRE... Or you could just let it
use, you know, an extra 15 MB or something.

Anyways, HTH.


-- 
nathan strutz
http://www.dopefly.com/


On Mon, Mar 24, 2008 at 2:44 PM, Troy Simpson <[EMAIL PROTECTED]> wrote:

> I am trying to find jar.exe according to the ColdFusion 8
> documentation, but it is no where to be found.  Where do I find
> jar.exe.  The ColdFusion 8 documentation say it should be in
> C:\JRun4\bin\.
>
> Thanks,
>
> --
> Thanks,
> Troy
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301956
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Steve Bryant
I think you want:
#Left(ListFirst(string,"."),100)#.
(untested)

> Instead of returning say just 100 characters. Is there a way to return 
> the first sentence only if its under 100 characters, and if not then 
> 100 characters resulting in a cut off string. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301955
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Coldfusion 8 on Leopard - all of a sudden stopped working

2008-03-24 Thread Dave l
I dont remember how you get back into the web connector but it should look like 
this http://www.markdrew.co.uk/blog/images//Picture%202.png


You can tell if default apache is running by going into your home folder then 
to sites and then run the html file in there or into your HD > library > 
webserver > documents and run the index.html page 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301954
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: String function question

2008-03-24 Thread Bruce Sorge
Appreciate it. I will give it a try.

denstar wrote:
> This is probably too late to help, but I did a similar hackish job:
>
> 
> #thisForm.editForm(url.formnum)#
> 
> 
> contents = rereplace(thisForm,"]*>(.*?)"," style='background-color:silver;'>\1","all");
> contents = rereplace(contents,']+text[^>]+value[
> =]+["'']([^"]*)[^>]+>'," style='background-color:silver;'>\1","all");
> contents = rereplacenocase(contents,"(.*?)","","all");
> 
>
> The cfsavecontent contains the rendered form, with values, and I just
> chopped the inputs off the values, basically, leaving the value there
> "alone".
>
> The select box stuff was commented out, so I bet I never got that working...
> this is a nasty way of doing things, but worked for what it was needed for.
>
> Figured I'd put the code out there, anyways. *shrug*  =]
>
> -denny
>
>   
>

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301953
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Brad Wood
You mean like this? (untested)


#listfirst(my_string,".")#.

#left(my_string,100)#


~Brad

-Original Message-
From: Nate Willard [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 5:00 PM
To: CF-Talk
Subject: Perhaps a little over complicated - Dissecting a String

Give a String such as: "Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut magna lectus, tristique in, convallis sed, eleifend
in, nulla. Nullam vulputate velit a urna. Vestibulum ultrices interdum
est. Aliquam erat volutpat. Vestibulum ut massa ut diam dignissim
vestibulum. Donec orci pede, imperdiet at, sodales ac, lobortis ac,
turpis. Quisque vel mi."


Instead of returning say just 100 characters. Is there a way to return
the first sentence only if its under 100 characters, and if not then 100
characters resulting in a cut off string.

Has anyone seen a custom tag that does this logic?

Thanks!




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301952
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Perhaps a little over complicated - Dissecting a String

2008-03-24 Thread Nate Willard
Give a String such as: "Lorem ipsum dolor sit amet, consectetuer adipiscing 
elit. Ut magna lectus, tristique in, convallis sed, eleifend in, nulla. Nullam 
vulputate velit a urna. Vestibulum ultrices interdum est. Aliquam erat 
volutpat. Vestibulum ut massa ut diam dignissim vestibulum. Donec orci pede, 
imperdiet at, sodales ac, lobortis ac, turpis. Quisque vel mi."


Instead of returning say just 100 characters. Is there a way to return the 
first sentence only if its under 100 characters, and if not then 100 characters 
resulting in a cut off string.

Has anyone seen a custom tag that does this logic?

Thanks!


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301951
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Using CFWindow getting the parent page to refresh

2008-03-24 Thread Rick Mason
Don,

OK.  On the home page of a portal users click on an icon and launch a report
in a separate browser instance.  At the top of the report there's a link
that launches a cfwindow that allows them to filter the report and select
how they want it sorted.  Their choices are saved to the database when the
form submits so they don't need to make the setting each time they launch
the report.

After saving their selections to the database I hide the window and refresh
the report.  However although the page does refresh it brings up the
original version, not the one reflecting the filter or sort changes they
just saved.

Here's the function that runs when the form is submitted:


function submitmyform() {

ColdFusion.Ajax.submitForm('cfformid', 'myreport.cfm'

);

ColdFusion.Window.hide('cfwindowname');

location.reload();



Rick Mason


On Mon, Mar 24, 2008 at 5:00 PM, Don L <[EMAIL PROTECTED]> wrote:

>  >I have a report that when called pops up a separate instance of the
> >browser.  I have a link on that report that calls a cfwindow containing a
> >cfform that lets you change filters and sort order on the report.
> >
> >In the past I have successfully used location.refresh() to refresh the
> page
> >reflecting the changes made but it's not working correctly.  Oh it
> refreshes
> >the report page after the form gets submitted but it's giving me the old
> >version of the page.  I've tried using meta tags so that it doesn't cache
> >the page, but they seem to have no affect.
> >
> >Can anyone help me out?
> >
> >
> >Rick Mason
>
> Can you re-state this problem?  It does not seem to be very clear to me.
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301949
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Where is jar.exe?

2008-03-24 Thread Troy Simpson
I am trying to find jar.exe according to the ColdFusion 8
documentation, but it is no where to be found.  Where do I find
jar.exe.  The ColdFusion 8 documentation say it should be in
C:\JRun4\bin\.

Thanks,

-- 
Thanks,
Troy

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301950
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: String function question

2008-03-24 Thread denstar
This is probably too late to help, but I did a similar hackish job:


#thisForm.editForm(url.formnum)#


contents = rereplace(thisForm,"]*>(.*?)","\1","all");
contents = rereplace(contents,']+text[^>]+value[
=]+["'']([^"]*)[^>]+>',"\1","all");
contents = rereplacenocase(contents,"(.*?)","","all");


The cfsavecontent contains the rendered form, with values, and I just
chopped the inputs off the values, basically, leaving the value there
"alone".

The select box stuff was commented out, so I bet I never got that working...
this is a nasty way of doing things, but worked for what it was needed for.

Figured I'd put the code out there, anyways. *shrug*  =]

-denny

On Fri, Mar 21, 2008 at 8:35 AM, Bruce Sorge <[EMAIL PROTECTED]> wrote:
> I have googled this all morning and I cannot find the answer, and I am
>  running out of time. Here is my situation:
>  I have an HTML form that is being pulled from a database table. When the
>  form is submitted, they want the form submitted to them in a PDF that is
>  emailed as an attachment. I know how to do that part. What they want is
>  for the submitted PDF to look exactly like the HTML form that they
>  submitted, replacing the form elements with the submitted values. I am
>  able to query the database and get the HTML form, using REReplace I can
>  strip out all of the input and form elements as well, leaving me with
>  the layout in tact. minus the input elements. What I cannot figure out
>  though is how to get the submitted values to replace the void left when
>  I strip the input elements.
>  I know that I need to find the form field names and then match them up
>  to the submitted names and insert the values, but I don't exactly know
>  how to go about this. Does this make sense?
>
>  Thanks,
>
>  Bruce
>
>  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301948
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ColdFusion instances running under other instances?

2008-03-24 Thread Ryan Stille
I'm working on a server with multiple instances of ColdFusion running on 
a Jrun4 installation.   Sometimes this gets weird and I get one of the 
instances running under another one.  This screen shot explains it better:
http://tinyurl.com/2l73dy

You can see the "admin" instance is running under the "cfusion" 
instance.  It should be running under a single jrunsvc process, like br1 
and br2 are.  When one of the instances gets like this, it is 
unresponsive.  Possibly because it can't grab the memory its supposed to 
because its limited by what the parent instance is setup for.

Has anyone ever seen this?  I have to manually kill the process, then 
start it, usually from the services control panel to get it to come back 
correctly.  It seems to be related to starting/restarting the instance 
from within the JRun administrator, but it doesn't happen all the time.

-Ryan


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301947
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cascade Delete issue

2008-03-24 Thread Nisher
hello I am attempting to further customize a menu system that consists of head 
navs, parent navs and subnavs...it is tri-level.  What i am trying to do is 
delete the head nav and have it loop through and delete the other levels as 
well so they become inactive as well.  Any help would be appreciated greatly...

the error i get when trying to delete these naves is as follows:

 Element NAVTEXTID is undefined in QRYHEADNAVEDIT.
 
The error occurred in D:\web\msh\LeaderNet\admin\winNavDelete.cfm: line 10

8 : 
9 : 

[bold]10 : [/bold]

11 : 
12 :


the section of code this is occurring in is as follows:




dbo.spNavigation 1, #url.navID#, null, 4




dbo.spNavigation 1, #qryNav1.navID#, null, 4





dbo.spNavigation 1, #qryNav2.navID#, null, 4



spNavDelete '#url.NavTextId#'


spNavDelete '#url.NavTextId#'


   
spNavDelete 
'#url.NavTextId#'






the stored procedure being used in this case is as follows:


USE [LeaderNet]
GO
/** Object:  StoredProcedure [dbo].[spNavDelete]Script Date: 03/24/2008 
17:51:04 **/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[spNavDelete] 
@navTextID  int

AS
BEGIN
UPDATE  dbo.nav
SET active = 0
WHERE   navID = (select distinct navID from navText where navTextID = 
@navTextID)


UPDATE  dbo.navText
SET active = 0
WHERE   navTextID = @navTextID
and navID = (select distinct navID from navText where navTextID 
= @navTextID)

END





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301946
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Images in the database good or bad?

2008-03-24 Thread Richard Dillman
OMG! I could tell you some stories about government contracting.

I actually had an IOT manager in an SSL and Site security meeting ask just
how many extra guards he was gonna have to hire!!
.. . .
o.0
.. . .
"Only 1 and, he wont have to be armed..."

On Mon, Mar 24, 2008 at 2:33 PM, Dana Kowalski <[EMAIL PROTECTED]>
wrote:

>  I think the main thing in the end is the scope of the project and
> personal preference.
>
>  If the site will maintain heavy load, especially the images section, then
> you may want to consider a file server for uploads and just store the
> filename with your record. This can take the strain off a possible i/o
> bottleneck on the database communication.
>
> My personal preference is:
> - App Server
> - File Server
> - Database Server
>
> You can argue pros and cons for all the approaches, but at the end of the
> day you gotta go with what gets the job done -for you-.
>
>  Also no one in here has brought up the ickle of being a govt. contractor
> and all the -crazy- stuff that goes along with that aspect of standing gear
> up as well ;)
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301945
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: cascade delete issue?

2008-03-24 Thread Dave Watts
> this is the code i am using while attempting to do a cascade 
> delete of navagation items in our custom menu system.  it 
> will delete the parent nav but then errors out while 
> attempting to delete the sub navs.  and comments r 
> suggestions would be welcome.

I suggest you post the actual error message, and perhaps the stored
procedure code as well.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301944
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cascade delete issue?

2008-03-24 Thread Nisher
this is the code i am using while attempting to do a cascade delete of 
navagation items in our custom menu system.  it will delete the parent nav but 
then errors out while attempting to delete the sub navs.  and comments r 
suggestions would be welcome.








dbo.spNavigation 1, #url.navID#, null, 4






dbo.spNavigation 1, #qryNav1.navID#, null, 4





dbo.spNavigation 1, #qryNav2.navID#, null, 4



spNavDelete '#url.NavTextId#'


spNavDelete '#url.NavTextId#'


   
spNavDelete 
'#url.NavTextId#'






Are you sure you want to remove
#qryNavInfo.NavText# from the menu 
Navigation list?













spNavDelete 
'#url.NavTextId#'  


Menu Navigation Item Deleted











~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301943
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread RICHARD SIMPSON
>> What if you have four concurrent users (or four hundred if 
>> your app get popular!), what happens if user two gets user 
>> three's id when she runs LAST_INSERT_ID()?
>
>This is exactly why databases provide concurrency control. You should use
>it.
>
>> That's the one of the only reasons I can see for using 
>> alternate keys. Whether it is a UUID created in Coldfusion 
>> or someother unique value...you KNOW what it is...everytime, 
>> because you set it, not the DB.
>
>That's great, as long as there are no other clients using the same database.
>Databases provide this functionality for a reason.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>
>Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
>http://training.figleaf.com/
>
>WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
>http://www.webmaniacsconference.com/


You can use @@identity in a sql statement. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301942
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: String index out of range: 0

2008-03-24 Thread T A
thanks...sorry for the delay was away for over a week now...it worked.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301941
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Using CFWindow getting the parent page to refresh

2008-03-24 Thread Don L
>I have a report that when called pops up a separate instance of the
>browser.  I have a link on that report that calls a cfwindow containing a
>cfform that lets you change filters and sort order on the report.
>
>In the past I have successfully used location.refresh() to refresh the page
>reflecting the changes made but it's not working correctly.  Oh it refreshes
>the report page after the form gets submitted but it's giving me the old
>version of the page.  I've tried using meta tags so that it doesn't cache
>the page, but they seem to have no affect.
>
>Can anyone help me out?
>
>
>Rick Mason

Can you re-state this problem?  It does not seem to be very clear to me. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301940
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFScript compedium

2008-03-24 Thread Michael Dinowitz
I'll update it asap.

On Mon, Mar 24, 2008 at 11:35 AM, Charlie Griefer <[EMAIL PROTECTED]>
wrote:

> On Mon, Mar 24, 2008 at 8:01 AM, Scott Stewart
> <[EMAIL PROTECTED]> wrote:
> > Hey all,
> >  Is there a comprehensive CFScript compendium anywhere?
>
> it's a tad old, but it still works (the notable exception being the
> new operators in CF8 not being there)...
> http://www.houseoffusion.com/tutorials/cfscript/
>
> once, just for shits and giggles, i threw together a calendar using
> nothing but cfscript (even using it to generate the HTML).  not
> suggesting this is a "best practice" by any means... was just me
> trying to jump into cfscript with both feet.  calendar sample and code
> are at http://charlie.griefer.com/code/cf/cfscript_calendar.cfm.  this
> is more of a sample tho, while Michael's tutorial above is more of the
> "compendium" that you're looking for.
>
> --
> Evelyn the dog, having undergone further modification pondered the
> significance of short-person behaviour in pedal depressed,
> pan-chromatic resonance, and other highly ambient domains. "Arf," she
> said.
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301939
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Dominic Watson
>
> I need to become more familiar with using unique constraints, etc


Yes you do! Do it now and save yourself pain later ;) Relying on a primary
key to make a table row unique invariably leads to duplicate data (even
though they have unique keys) which is a royal PITA. As a general rule,
every table should have a primary key and at least one unique constraint,
i.e. every row in any table should be unique regardless of the PK and the db
can enforce that for you with unique constraints.

Say goodbye to duplicate data today!

:p

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301938
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Music previewing

2008-03-24 Thread William Seiter
Thank you Will and Bobby,

In my searches, I came across a premade 'sound machine' flash file which
takes an XML document and then you indicate which sound file from the XML
you had wanted.  Does anyone know of any other premade flash files which
would take a simple 'url' in the flash variables from the embed or object
tag to play the music?

Otherwise I will need to download the trial of Adobe Flash  

Thank you again,
William

::-Original Message-
::From: Will Tomlinson [mailto:[EMAIL PROTECTED]
::Sent: Monday, March 24, 2008 4:16 AM
::To: CF-Talk
::Subject: Re: Music previewing
::
::>I am trying to get a temporary fix of having an embed object created
::>dynamically through javascript and then using a settimeout to replace
::that
::>object with a blank one that will 'stop' the music playing, but since the
::>music isn't 'streaming' the song takes too much time to download to the
::>users' machine before starting the playback.
::>
::
::Flash will stream the music automatically like you need.
::
::Will
::
::

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301937
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ColdFusion and IIS Application Pool recycling

2008-03-24 Thread mark kecko
Setup: Windows 2003 Server / IIS 6 / CF 8
We have several websites setup in IIS, each with their own IIS application 
pool.  Every once in a while, one of these application pools will fail more 
than 5 times in ten minutes, causing the application pool to shutdown.  The 
good news is all of our other websites, on their own app pools, stay up.

Problem: 
After we recycle the app pool, and try to run a CF page, we get an error that 
states there is no mapping between IIS and CF.  My thoughts were that this was 
somehow an IIS issue, and I wanted to confirm that.  I thought the easiest way 
to do so would be to make sure restarting the CF service didn't fix the 
problem.  So I restarted CF, and, to my surprise, we website started working 
again.

So my questions are...
Why do I have to restart CF after I recycle an IIS application pool to get 
everything working again?
To a deeper level, besides the ISAPI extensions (.cfm, .cfc, etc.) listed in 
the IIS websites Home Directory > Configuration > Application Configuration 
page, what is the relationship between IIS, IIS application pools and CF.

Any help here would be greatly appreciated! 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301936
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Coldfusion 8 on Leopard - all of a sudden stopped working

2008-03-24 Thread denstar
Are you sure it's the same copy of apache that's running, that you installed?

Sounds sorta like maybe the previous version is running, instead of
the one you'd personally installed.

There's an easy way to tell what's running from where, but I haven't
had enough coffee today, or something, as I cannot recall.

Maybe the "lsof" command.

/me scratches head, looks for more coffee

On Sun, Mar 23, 2008 at 7:09 PM, Andy Matthews <[EMAIL PROTECTED]> wrote:
> I think I know what you mean about LoadModule Dave...this is what's
>  currently in my httpd.conf file for CF/JRun:

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301935
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


OT: Looking to create CREATE script

2008-03-24 Thread Michael Muller
I've been using BACKUP and RESTORE scripts to replicate BDs to new DBs for 
years and would like to move to using CREATE and INSERT instead.

Is there a stored procedure that will create a full set of CREATE and INSERT 
statements to completely create a new DB?  

If there's something in the Management Studio I'm just not finding it.  I've 
tried "Script Database As... Create To... Clipboard" but this only creates the 
table structure and doesn't include the data.

I am using SQL Server Express.

Thanks,

Mik 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301934
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ColdFusion and IIS Application Pool recycling

2008-03-24 Thread mark kecko
Setup: Windows 2003 Server / IIS 6 / CF 8
We have several websites setup in IIS, each with their own IIS application 
pool.  Every once in a while, one of these application pools will fail more 
than 5 times in ten minutes, causing the application pool to shutdown.  The 
good news is all of our other websites, on their own app pools, stay up.

Problem: 
After we recycle the app pool, and try to run a CF page, we get an error that 
states there is no mapping between IIS and CF.  My thoughts were that this was 
somehow an IIS issue, and I wanted to confirm that.  I thought the easiest way 
to do so would be to make sure restarting the CF service didn't fix the 
problem.  So I restarted CF, and, to my surprise, we website started working 
again.

So my questions are...
Why do I have to restart CF after I recycle an IIS application pool to get 
everything working again?
To a deeper level, besides the ISAPI extensions (.cfm, .cfc, etc.) listed in 
the IIS websites Home Directory > Configuration > Application Configuration 
page, what is the relationship between IIS, IIS application pools and CF.

Any help here would be greatly appreciated! 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301933
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Images in the database good or bad?

2008-03-24 Thread Dana Kowalski
 I think the main thing in the end is the scope of the project and personal 
preference. 

 If the site will maintain heavy load, especially the images section, then you 
may want to consider a file server for uploads and just store the filename with 
your record. This can take the strain off a possible i/o bottleneck on the 
database communication.

My personal preference is:
- App Server
- File Server
- Database Server

You can argue pros and cons for all the approaches, but at the end of the day 
you gotta go with what gets the job done -for you-. 

 Also no one in here has brought up the ickle of being a govt. contractor and 
all the -crazy- stuff that goes along with that aspect of standing gear up as 
well ;) 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301932
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Using CFWindow getting the parent page to refresh

2008-03-24 Thread Rick Mason
I have a report that when called pops up a separate instance of the
browser.  I have a link on that report that calls a cfwindow containing a
cfform that lets you change filters and sort order on the report.

In the past I have successfully used location.refresh() to refresh the page
reflecting the changes made but it's not working correctly.  Oh it refreshes
the report page after the form gets submitted but it's giving me the old
version of the page.  I've tried using meta tags so that it doesn't cache
the page, but they seem to have no affect.

Can anyone help me out?


Rick Mason


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301931
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Brad Wood
Rick Faircloth wrote:
> I'm thinking about changing from using auto-incrementing integers
> to CF-generated UUID's for primary keys in my mysql db's.
> 
> Any drawbacks in doing that?

1. Storage size.

==

I'll ditto that.  Our Database is a healthy 32 Gigs or so.  We used
GUIDs with the idea that we might want to leverage merge replication
(which never really happened).  Our DB is very relational, so many
tables have several GUID columns which are foreign keys. Additionally
many of those columns exist in indexes as well.  Unfortunately, it is
not worth the time to go back and change, but I calculated the other day
that we spend about 13 Gigs of storage space on GUIDs in our tables and
indexes.  Had all those GUIDs been ints, it only would have been around
3 Gigs.  So we have an extra 10 Gigs of space difference because we used
GUIDs instead of ints.  

~Brad

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301930
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Jochem van Dieten
Rick Faircloth wrote:
> The ID that was generated is maintained in the server on a per-connection 
> basis.
> This means that the value returned by the function to a given client is the
> first AUTO_INCREMENT value generated for most recent statement affecting an
> AUTO_INCREMENT column by that client. This value cannot be affected by other 
> clients,
> even if they generate AUTO_INCREMENT values of their own. This behavior 
> ensures
> that each client can retrieve its own ID without concern for the activity
> of other clients, and without the need for locks or transactions.
> ==
> 
> Am I wrong in my understanding?  No locks, no transactions needed?

Correct. However, you need to make sure that all your queries use the
same connection. In order to do that you need a transaction. (There is
some implicit behavior in Adobe's CFML engine that makes all queries in
a single request use the same connection, but in for instance the CFML
engine from NewAtlanta every query in a request can use a different
connection.)

Jochem


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301929
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Images in the database good or bad?

2008-03-24 Thread Jochem van Dieten
Richard Dillman wrote:
> I'm in the process of designing a site that will allow people to upload
> (JPG,PDF,DOC,XLS) files. I'm looking at about 1-4 mb each item. Is it better
> to do a file upload, or better to insert to the database?

I find keeping the images in the database is more manageable with 
everthing you need in one place. However keeping them on the filesystem 
performs better. Not only because you reduce the number of layers 
involved (webserver, CF, DB and filesystem versus webserver and 
filesystem), but also because CF has a tendency to become a bottleneck 
and memory hog serving many files from a database. If you go that way, 
make sure you write the actual code that serves the images in plain Java 
instead of CF so you can stream the file.

Jochem

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301928
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Jochem van Dieten
Rick Faircloth wrote:
> I'm thinking about changing from using auto-incrementing integers
> to CF-generated UUID's for primary keys in my mysql db's.
> 
> Any drawbacks in doing that?

1. Storage size.
Let's suppose you have a table for a many-to-many relation. That is 72 
bytes for the 2 fields and another 72 bytes for the indexes. With 
integers that would have been 16 bytes. This directly translates to 
query performance because of the extra I/O the database has to do. You 
may or may not care about that since the overhead is a constant factor, 
but even at 36 vs. 16 bytes (string vs. binary UUID representation) that 
performance difference is measurable: 
http://jochem.vandieten.net/2008/02/06/postgresql-uuids-and-coldfusion-1/

2. String vs. integer comparison and charsets
Maybe not relevant for MySQL, but since you are shifting from from an 
integer to a string you should take the effects of character set 
conversion into consideration. Implicit character set conversion can 
degrade a query from an index scan to a table scan:
http://jochem.vandieten.net/2008/03/22/ms-sql-server-and-the-coldfusion-string-format-setting/

3. Generation time
The speed of UUID generation in CF is limited to about 0.64 / 
clockresolution. So on Windows where the Java clock resolution is 10 
milliseconds, that translates to 64 UUIDs per second. In some processes 
that is a bottleneck. (It can go faster, but then you get the problem 
where time starts moving too fast.)

Jochem


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301927
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Seeking Spreadsheet App Simulation in CF

2008-03-24 Thread Axel Schultze
Rick,
I guess CFGRID is your answer. 
It has the special advantage that you can edit any cell of a structure and than 
update the whole enchilada at once. It is a very powerful way to edit large 
amount of structured data, like a customer database.

You define your GRID, load data with the respective query, make the grid 
mode=Edit and once you submit you do a CFGRID UPDATE and store the whole 
package back to the DB. Make sure your primary key is in the GRID - you may set 
it to visible="no".

Axel

>Does anyone know of a tag or simple app that simulates a "spreadsheet"
>within a page. I am looking for only the simplest functionality that
>will enable users to input/update simple text data into a cell. 
>
>Rick 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301926
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Seeking Spreadsheet App Simulation in CF

2008-03-24 Thread Josh Nathanson
> Does anyone know of a tag or simple app that simulates a "spreadsheet"
> within a page. I am looking for only the simplest functionality that
> will enable users to input/update simple text data into a cell.

Rick - I have used a jQuery plugin called "jEditable" to achieve something 
like this.

Basically it allows you to click on a div or table cell, and it turns it 
into an input field.  Then when you enter data and hit return, it executes a 
callback function (which can be an ajax call to update your db if you like) 
and changes the input field back into whatever it was before, and displays 
the value that was entered inserted into the cell or div.

I suppose if you wanted to get real fancy, you could style your inputs so 
that it wasn't even noticeable to the end user that it had changed into an 
input field.

-- Josh 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301925
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Raymond Camden
Wow, that convinces me. ;)

On Mon, Mar 24, 2008 at 11:22 AM, Dave Watts <[EMAIL PROTECTED]> wrote:
> > Dave, what issues do you speak of? I know that UUID creation
>  > is NOT fast, but when you say "issues", it leads me to think
>  > you mean multiple bugs.
>
>  http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:51685#278231
>  http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=970
>
-- 
===
Raymond Camden, Camden Media

Email : [EMAIL PROTECTED]
Blog : www.coldfusionjedi.com
AOL IM : cfjedimaster

Keep up to date with the community: http://www.coldfusionbloggers.org

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301924
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: error with ColdFusion 8 ODBC Agent

2008-03-24 Thread Troy Montour
Hareni,
not sure if your still on the boards since this post is a year old but just 
doing a clean multi-server install and was getting the issue below so I ran 
your scripts which removed the services just fine but when it ran the install 
script it came back with this error.

An error occurred when performing a file operation read on file 
C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\db\slserver54\cfg\swandm.ini.
The cause of this exception was: java.io.FileNotFoundException: 
C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\db\slserver54\cfg\swandm.ini
 (The system cannot find the path specified).
 

since I'm at work I can't check to make sure the file is there but just looking 
for some steps just incase it is there. if its not I will have to see what 
happened during install.

Thanks
Troy


>Hi Matthew,
>
>Sometimes, it might happen that the ODBC services Coldfusion8 ODBC Agent
>and Coldfusion 8 ODBC Server do not get installed properly for new J2EE
>deployment and in services property the path keeps pointing to an old
>deployment directory and hence they do not start up. 
>
>What you can do is, remove the existing ODBC services using
>remove-odbcservices.cfm having the script given below:
>
>
>
>
>createObject("component","cfide.adminapi.administrator").login("admin");
>
>myObj =
>createObject("component","cfide.adminapi.datasource");
>
>writeOutput("Removing ODBC Services...");
>
>returnValue = myObj.removeODBCservice();
>
>writeOutput("ODBC Services removed");
>
>
>
>
>
>And then, install the ODBC services using install-odbcservices.cfm
>having the script given below:
>
>
>
>
>createObject("component","cfide.adminapi.administrator").login("admin");
>
>myObj =
>createObject("component","cfide.adminapi.datasource");
>
>writeOutput("Installing ODBC Services...");
>
>returnValue = myObj.installODBCservice();
>
>writeOutput("ODBC Services installed");
>
>
>
>Then, try starting ColdFusion ODBC Server service.
>
>Thanks,
>Hareni


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301923
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Dave Watts
> Dave, what issues do you speak of? I know that UUID creation 
> is NOT fast, but when you say "issues", it leads me to think 
> you mean multiple bugs.

http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:51685#278231
http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=970

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301922
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFScript compedium

2008-03-24 Thread Gerald Guido
>> not suggesting this is a "best practice" by any means... was just me
>> trying to jump into cfscript with both feet.  calendar sample and code
>> are at http://charlie.griefer.com/code/cf/cfscript_calendar.cfm.  this

Huh, that looks a lot like PHP.

Charlie points out reason # 432 why I use CF.

Write out 85+ lines of code and css by hand
Or

 Or



-- 
"I am always doing that which I can not do, in order that I may learn how to
do it."
- Pablo Picasso


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301921
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Brad Wood
I wondered the same thing, but a few minutes of Googling only turned up
this:

http://orangepips.instantspot.com/blog/2007/11/12/Coldfusion-and-UUIDs-

 which addresses security concerns that a Version 1 UUID can be
reverse engineered to produce the MAC address of your server.

Additionally, I am not necessarily a proponent of having your DB client
generate primary keys if they are UUIDs or GUIDs, but I'm still trying
to wrap my head around how it would break your application.

Consider the following table:
my_table
my_table_id uniqueidentifier Primary Key
my_name varchar(max)

Ok, so let's say a Java application and a CF application are inserting
into this table and creating their own GUIDs as they go.  Even though I
don't know WHY you would want to do that... I can't figure out how it
would NOT work.  The only exception I've been able to think of is if you
were using MS SQL's sequential GUIDs.  [ newSequentialID() ]  Please
enlighten me as I must be considering too simple of a scenario.

~Brad

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 10:39 AM
To: CF-Talk
Subject: Re: Any "Gotcha's" in using CF UUID for db record primary key?

Dave, what issues do you speak of? I know that UUID creation is NOT
fast, but when you say "issues", it leads me to think you mean
multiple bugs.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301920
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Raymond Camden
Dave, what issues do you speak of? I know that UUID creation is NOT
fast, but when you say "issues", it leads me to think you mean
multiple bugs.


On Mon, Mar 24, 2008 at 10:23 AM, Dave Watts <[EMAIL PROTECTED]> wrote:
> > What's the reason for using the db instead of CF to generate
>  > the UUID?  To keep the load off CF?
>
>  Primarily, because that sort of thing is the database server's job, in the
>  same way that calculating aggregates is something better left to the
>  database server than your application.
>
>  There are known issues with CF's creation of UUIDs.
>


-- 
===
Raymond Camden, Camden Media

Email : [EMAIL PROTECTED]
Blog : www.coldfusionjedi.com
AOL IM : cfjedimaster

Keep up to date with the community: http://www.coldfusionbloggers.org

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301919
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFScript compedium

2008-03-24 Thread Charlie Griefer
On Mon, Mar 24, 2008 at 8:01 AM, Scott Stewart
<[EMAIL PROTECTED]> wrote:
> Hey all,
>  Is there a comprehensive CFScript compendium anywhere?

it's a tad old, but it still works (the notable exception being the
new operators in CF8 not being there)...
http://www.houseoffusion.com/tutorials/cfscript/

once, just for shits and giggles, i threw together a calendar using
nothing but cfscript (even using it to generate the HTML).  not
suggesting this is a "best practice" by any means... was just me
trying to jump into cfscript with both feet.  calendar sample and code
are at http://charlie.griefer.com/code/cf/cfscript_calendar.cfm.  this
is more of a sample tho, while Michael's tutorial above is more of the
"compendium" that you're looking for.

-- 
Evelyn the dog, having undergone further modification pondered the
significance of short-person behaviour in pedal depressed,
pan-chromatic resonance, and other highly ambient domains. "Arf," she
said.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301918
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Mark Kruger
Dave,

Of course the other side of the coin is writing an application that can work
with multiple databases... That can sometimes require a generic approach
that resides in the application logic. Many shopping carts are like that.

-Mark 


Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 10:23 AM
To: CF-Talk
Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?

> What's the reason for using the db instead of CF to generate the UUID?  
> To keep the load off CF?

Primarily, because that sort of thing is the database server's job, in the
same way that calculating aggregates is something better left to the
database server than your application.

There are known issues with CF's creation of UUIDs.

A database should be able to work with multiple applications. If one
application contains what is essentially data access logic, this isn't
possible.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301917
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Dave Watts
> What's the reason for using the db instead of CF to generate 
> the UUID?  To keep the load off CF?

Primarily, because that sort of thing is the database server's job, in the
same way that calculating aggregates is something better left to the
database server than your application.

There are known issues with CF's creation of UUIDs.

A database should be able to work with multiple applications. If one
application contains what is essentially data access logic, this isn't
possible.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301916
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFScript compedium

2008-03-24 Thread Casey Dougall
On Mon, Mar 24, 2008 at 11:01 AM, Scott Stewart <[EMAIL PROTECTED]>
wrote:

> Hey all,
>
>
>
> Is there a comprehensive CFScript compendium anywhere?
>
>
Only one I know of is the Cheat Sheet.
http://www.petefreitag.com/cheatsheets/coldfusion/cfscript/

Casey


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301915
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Help setting up server file locations

2008-03-24 Thread Dave Watts
> I need some help configuring my server.  The server has dual 
> drives a 30 gig (C: drive) and a 180 gig (D; drive) .  Both 
> are backed up by redundant drives.  What I want to do is to 
> run the CF applications on the C drive and locate all of the 
> uploaded photos, and files (word, excel, powerpoint 
> stuff) on the D :  drive.This is to allow me to easily 
> store the bulk 
> of the app, which will be the uploaded Word, PPT, excel etc 
> files on the larger drive and also to be able to upgrade the 
> D: drive bigger if I have to without having to reload CF and 
> all the app. 

You should not store web-accessible content on the system partition. You can
install CF on the system partition (although that's less than ideal), but
your .cfm/.cfc files along with other web content should be on a separate
partition containing nothing else, for security reasons - specifically, to
prevent directory traversal attacks:

http://en.wikipedia.org/wiki/Directory_traversal

To create this configuration, simply configure your web server's root
directory to point to a directory within this partition.

If you need to upgrade the drive in the future, this configuration will be
just as easy to work with as what you asked for.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301914
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Help setting up server file locations

2008-03-24 Thread J.J. Merrick
This will probably be done via your Web server app and not really
ColdFusion. All CF needs to know is where to place the files so if you
created a "Static Files" application variable then just change it to
"d:\whereeveryourfileare"

As far as making certain directories off your webroot point to folders
outside your initial webroot you will need to create Aliases in Apache or
IIS depending on what you use. It it is apache it is as simple as doing a
directive in your HTTPD.CONF file:

Alias /images d:\whateveryouareputtingthem

In IIS I think they are called Virtual Folders and you just right click and
add on the site in IIS manager.


Hope that helps,


J.J.

On Mon, Mar 24, 2008 at 8:02 AM, Donald R Langley <[EMAIL PROTECTED]>
wrote:

> I need some help configuring my server.  The server has dual drives a 30
> gig (C: drive) and a 180 gig (D; drive) .  Both are backed up by redundant
> drives.  What I want to do is to run the CF applications on the C drive
> and locate all of the uploaded photos, and files (word, excel, powerpoint
> stuff) on the D :  drive.This is to allow me to easily store the bulk
> of the app, which will be the uploaded Word, PPT, excel etc files on the
> larger drive and also to be able to upgrade the D: drive bigger if I have
> to without having to reload CF and all the app.
> I will have a need to access the files on the D : drive via 
> links  and use cfupload to load new files within my CF app.
> I can't figure out how to do it.
> Can anyone help me out?
> Thanks  Rob
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301913
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Dave Watts
> What if you have four concurrent users (or four hundred if 
> your app get popular!), what happens if user two gets user 
> three's id when she runs LAST_INSERT_ID()?

This is exactly why databases provide concurrency control. You should use
it.

> That's the one of the only reasons I can see for using 
> alternate keys. Whether it is a UUID created in Coldfusion 
> or someother unique value...you KNOW what it is...everytime, 
> because you set it, not the DB.

That's great, as long as there are no other clients using the same database.
Databases provide this functionality for a reason.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301912
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Dave Watts
> And this is the info in the MySQL 5 docs that convinced me 
> that LAST_INSERT_ID() was a safe means of retrieving id's, 
> even with unlimited number of users working simultaneously...
> 
> ==
> 
> The ID that was generated is maintained in the server on a 
> per-connection basis.
> This means that the value returned by the function to a given 
> client is the first AUTO_INCREMENT value generated for most 
> recent statement affecting an AUTO_INCREMENT column by that 
> client. This value cannot be affected by other clients, even 
> if they generate AUTO_INCREMENT values of their own. This 
> behavior ensures that each client can retrieve its own ID 
> without concern for the activity of other clients, and 
> without the need for locks or transactions.
> 
> ==
> 
> Am I wrong in my understanding?  No locks, no transactions needed?

You are correct. No locks or transactions are needed. Many database servers
provide analogous functionality.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301911
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


CFScript compedium

2008-03-24 Thread Scott Stewart
Hey all, 

 

Is there a comprehensive CFScript compendium anywhere?

 

Thanks

 

sas

 

-- 

Scott Stewart

ColdFusion Developer

 

SSTWebworks

4405 Oakshyre Way

Raleigh, NC. 27616

(919) 874-6229 (home)

(703) 220-2835 (cell)

 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 3/23/2008
6:50 PM
 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301910
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Images in the database good or bad?

2008-03-24 Thread James Holmes
Exactly - people who work in GIS will tell you a lot (if you ask)
about the power of DB systems that can do spatial analysis (Oracle,
for example).

On Mon, Mar 24, 2008 at 10:53 PM, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> >Lets say you get to be the size of myspace.com or flickr.com they
>  cannot be storing all of those images in a database would they?
>
>  It is very possible...
>
>  TerraServer:
>
>  http://terraserver-usa.com/about.aspx?n=AboutTerraServiceOverview
>
>  http://research.microsoft.com/displayArticle.aspx?id=272
>
>  "The images on TerraServer are made up of individual 200 x 200 pixel
>  tiles that have been resampled from the USGS aerial images. The tiles
>  are then organized in a database table by theme, resolution, and
>  location."
>
>  m!ke
>
>
>  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301909
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Dave Watts
> But can't you put a  around the query that inserts 
> the record and retrieves the last ID?

If you want to serialize database transactions, that's what the
CFTRANSACTION tag is for.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301908
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Rick Faircloth
And this is the info in the MySQL 5 docs that convinced me that LAST_INSERT_ID()
was a safe means of retrieving id's, even with unlimited number of users working
simultaneously...

==

The ID that was generated is maintained in the server on a per-connection basis.
This means that the value returned by the function to a given client is the
first AUTO_INCREMENT value generated for most recent statement affecting an
AUTO_INCREMENT column by that client. This value cannot be affected by other 
clients,
even if they generate AUTO_INCREMENT values of their own. This behavior ensures
that each client can retrieve its own ID without concern for the activity
of other clients, and without the need for locks or transactions.

==

Am I wrong in my understanding?  No locks, no transactions needed?

Rick

> -Original Message-
> From: Greg Morphis [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2008 10:18 AM
> To: CF-Talk
> Subject: Re: Any "Gotcha's" in using CF UUID for db record primary key?
> 
> But can't you put a  around the query that inserts the
> record and retrieves the last ID?
> 
> On Mon, Mar 24, 2008 at 8:59 AM, Mark Fuqua <[EMAIL PROTECTED]> wrote:
> > What if you have four concurrent users (or four hundred if your app get
> >  popular!), what happens if user two gets user three's id when she runs
> >  LAST_INSERT_ID()?
> >
> >  That's the one of the only reasons I can see for using alternate keys.
> >  Whether it is a UUID created in Coldfusion or someother unique value...you
> >  KNOW what it is...everytime, because you set it, not the DB.
> >
> >  Mark
> >
> >
> >
> >



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301907
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Greg Morphis
But can't you put a  around the query that inserts the
record and retrieves the last ID?

On Mon, Mar 24, 2008 at 8:59 AM, Mark Fuqua <[EMAIL PROTECTED]> wrote:
> What if you have four concurrent users (or four hundred if your app get
>  popular!), what happens if user two gets user three's id when she runs
>  LAST_INSERT_ID()?
>
>  That's the one of the only reasons I can see for using alternate keys.
>  Whether it is a UUID created in Coldfusion or someother unique value...you
>  KNOW what it is...everytime, because you set it, not the DB.
>
>  Mark
>
>
>
>
>  -Original Message-
>  From: Rick Faircloth [mailto:[EMAIL PROTECTED]
>
>
> Sent: Monday, March 24, 2008 8:22 AM
>  To: CF-Talk
>  Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?
>
>  What's the reason for using the db instead of CF to
>  generate the UUID?  To keep the load off CF?
>
>  I was thinking I might use CF in the following manner to generate
>  a UUID for a record:
>
>  - Create UUID and variable to hold UUID via CF and cfset
>  - User completes form with textual information and photo selection via
>  cffile
>  - Run insert query to create primary textual record, including inserting
>  UUID
>  - Run second insert query to create records in photo table for each
>   cffile field mentioned above, inserting UUID for relational key to textual
>  information
>
>  After doing some reading in the MySQL 5 docs, it looks like I could use the
>  LAST_INSERT_ID() function to return the auto-incrementing primary key of the
>  "main"
>  textual record of a property (Real Estate property), then run an insert
>  query for the
>  photo records on another table, using the LAST_INSERT_ID() as the relational
>  key to the
>  primary property table.
>
>  - User completes form with primary record info and selects photos
>  - Insert query runs creating primary property record
>  - Run another query to retrieve LAST_INSERT_ID() (or just use that value as
>  a variable,
>  #LAST_INSERT_ID()# ???)
>  - Run another query to insert photos into photo table using LAST_INSERT_ID
>  as relational key
>
>  Using LAST_INSERT_ID(), it seems that I could allow a single input form for
>  two tables,
>  property and property_photos, create a more user-friendly work flow, and
>  avoid the
>  "messiness" of UUID altogether.
>
>  Thoughts?
>
>  Rick
>
>
>  > -Original Message-
>  > From: Dave Watts [mailto:[EMAIL PROTECTED]
>  > Sent: Sunday, March 23, 2008 11:48 PM
>  > To: CF-Talk
>  > Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?
>  >
>  > > At the same time I kind of DON'T agree with them if you're
>  > > doing what we were doing: if you're using the key to link
>  > > tables (so that you can combine multiple databases easily)
>  > > and using them to link to non-DB information (log files, etc)
>  > > then it seems like extra work to do a "real" auto-increment
>  > > PK as well.
>  >
>  > I'll second this. Either use UUIDs or don't. In either case, I'd recommend
>  > that you use your database's ability to generate these instead of doing it
>  > from CF.
>  >
>  > Dave Watts, CTO, Fig Leaf Software
>  > http://www.figleaf.com/
>  >
>  > Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
>  > http://training.figleaf.com/
>  >
>  > WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
>  > http://www.webmaniacsconference.com/
>  >
>  >
>
>
>
>  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301906
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Claude Schneegans
 >>I'm thinking about changing from using auto-incrementing integers
to CF-generated UUID's for primary keys in my mysql db's.

Keep in mind that primary keys are by definition indexed, and in order 
to maintain an index,
keys are compared to others. Now comparing to numbers takes only one 
machine instruction,
while comparing 32 bytes string takes a loop of potentially 32 comparisons.

So auto-incrementing integers are much more efficient.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301905
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Ben Forta
>> Whether it is a UUID created in ColdFusion or some other unique
value...you
>> KNOW what it is...every time, because you set it, not the DB.

Until you need to use another database client, one other than ColdFusion,
then things get messier. If you need to manually insert rows, or do a batch
import, or ... This is the main reason I'm not a big fan of database clients
(any clients, including ColdFusion) generating PKs.

--- Ben



-Original Message-
From: Mark Fuqua [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 10:00 AM
To: CF-Talk
Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?

What if you have four concurrent users (or four hundred if your app get
popular!), what happens if user two gets user three's id when she runs
LAST_INSERT_ID()?

That's the one of the only reasons I can see for using alternate keys.
Whether it is a UUID created in Coldfusion or someother unique value...you
KNOW what it is...everytime, because you set it, not the DB.

Mark



-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 8:22 AM
To: CF-Talk
Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?

What's the reason for using the db instead of CF to
generate the UUID?  To keep the load off CF?

I was thinking I might use CF in the following manner to generate
a UUID for a record:

- Create UUID and variable to hold UUID via CF and cfset
- User completes form with textual information and photo selection via
cffile
- Run insert query to create primary textual record, including inserting
UUID
- Run second insert query to create records in photo table for each
  cffile field mentioned above, inserting UUID for relational key to textual
information

After doing some reading in the MySQL 5 docs, it looks like I could use the
LAST_INSERT_ID() function to return the auto-incrementing primary key of the
"main"
textual record of a property (Real Estate property), then run an insert
query for the
photo records on another table, using the LAST_INSERT_ID() as the relational
key to the
primary property table.

- User completes form with primary record info and selects photos
- Insert query runs creating primary property record
- Run another query to retrieve LAST_INSERT_ID() (or just use that value as
a variable,
#LAST_INSERT_ID()# ???)
- Run another query to insert photos into photo table using LAST_INSERT_ID
as relational key

Using LAST_INSERT_ID(), it seems that I could allow a single input form for
two tables,
property and property_photos, create a more user-friendly work flow, and
avoid the
"messiness" of UUID altogether.

Thoughts?

Rick


> -Original Message-
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 23, 2008 11:48 PM
> To: CF-Talk
> Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?
> 
> > At the same time I kind of DON'T agree with them if you're
> > doing what we were doing: if you're using the key to link
> > tables (so that you can combine multiple databases easily)
> > and using them to link to non-DB information (log files, etc)
> > then it seems like extra work to do a "real" auto-increment
> > PK as well.
> 
> I'll second this. Either use UUIDs or don't. In either case, I'd recommend
> that you use your database's ability to generate these instead of doing it
> from CF.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> 
> Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
> http://training.figleaf.com/
> 
> WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
> http://www.webmaniacsconference.com/
> 
> 





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301904
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Need help

2008-03-24 Thread Don L
>Sorry I am not sure what you actual problem is.
>
>But can I ask why you are using IFrames? Cfdiv maybe just as good for
>your needs:-)

Hey Andrew,

I have to use IFrames inside a CFWINDOW because I need to allow multiple 
instances of a WYSIWYG editor (which I've created and is working 
outside/without cfwindow and it uses IFrames's designMode to be "On" for the 
WYSIWYG feature).

And yet I'm open to another technique of providing WYSIWYS editing feature 
similar to IFrames's designMode to "On" if it exists.

Many thanks.

Don



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301903
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Mark Fuqua
What if you have four concurrent users (or four hundred if your app get
popular!), what happens if user two gets user three's id when she runs
LAST_INSERT_ID()?

That's the one of the only reasons I can see for using alternate keys.
Whether it is a UUID created in Coldfusion or someother unique value...you
KNOW what it is...everytime, because you set it, not the DB.

Mark



-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 8:22 AM
To: CF-Talk
Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?

What's the reason for using the db instead of CF to
generate the UUID?  To keep the load off CF?

I was thinking I might use CF in the following manner to generate
a UUID for a record:

- Create UUID and variable to hold UUID via CF and cfset
- User completes form with textual information and photo selection via
cffile
- Run insert query to create primary textual record, including inserting
UUID
- Run second insert query to create records in photo table for each
  cffile field mentioned above, inserting UUID for relational key to textual
information

After doing some reading in the MySQL 5 docs, it looks like I could use the
LAST_INSERT_ID() function to return the auto-incrementing primary key of the
"main"
textual record of a property (Real Estate property), then run an insert
query for the
photo records on another table, using the LAST_INSERT_ID() as the relational
key to the
primary property table.

- User completes form with primary record info and selects photos
- Insert query runs creating primary property record
- Run another query to retrieve LAST_INSERT_ID() (or just use that value as
a variable,
#LAST_INSERT_ID()# ???)
- Run another query to insert photos into photo table using LAST_INSERT_ID
as relational key

Using LAST_INSERT_ID(), it seems that I could allow a single input form for
two tables,
property and property_photos, create a more user-friendly work flow, and
avoid the
"messiness" of UUID altogether.

Thoughts?

Rick


> -Original Message-
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 23, 2008 11:48 PM
> To: CF-Talk
> Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?
> 
> > At the same time I kind of DON'T agree with them if you're
> > doing what we were doing: if you're using the key to link
> > tables (so that you can combine multiple databases easily)
> > and using them to link to non-DB information (log files, etc)
> > then it seems like extra work to do a "real" auto-increment
> > PK as well.
> 
> I'll second this. Either use UUIDs or don't. In either case, I'd recommend
> that you use your database's ability to generate these instead of doing it
> from CF.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> 
> Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
> http://training.figleaf.com/
> 
> WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
> http://www.webmaniacsconference.com/
> 
> 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301902
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Images in the database good or bad?

2008-03-24 Thread Dawson, Michael
>Lets say you get to be the size of myspace.com or flickr.com they
cannot be storing all of those images in a database would they?

It is very possible...

TerraServer:

http://terraserver-usa.com/about.aspx?n=AboutTerraServiceOverview

http://research.microsoft.com/displayArticle.aspx?id=272

"The images on TerraServer are made up of individual 200 x 200 pixel
tiles that have been resampled from the USGS aerial images. The tiles
are then organized in a database table by theme, resolution, and
location."

m!ke

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301901
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Images in the database good or bad?

2008-03-24 Thread Casey Dougall
On Mon, Mar 24, 2008 at 10:17 AM, Dave Ross <[EMAIL PROTECTED]> wrote:

> IMO there are times when it makes sense to store binary content in a
> database, and times when it does not.
>
> My rule of thumb is based on size and usage. If you expect the amount of
> binary content to grow tremendously, I would avoid storing binary content in
> the db. Otherwise, for small items such as profile photos, etc - it can make
> your life a lot easier.
>
>
Lets say you get to be the size of myspace.com or flickr.com they cannot be
storing all of those images in a database would they?

I would think it would be less expensive to replicate file systems vs.
replicating databases to handle the load.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301900
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Images in the database good or bad?

2008-03-24 Thread Dave Ross
IMO there are times when it makes sense to store binary content in a database, 
and times when it does not.

My rule of thumb is based on size and usage. If you expect the amount of binary 
content to grow tremendously, I would avoid storing binary content in the db. 
Otherwise, for small items such as profile photos, etc - it can make your life 
a lot easier.

Also keep in mind that SQL Server 2008 includes a new "file stream" column type 
which is really the best of both worlds.

http://blogs.msdn.com/rdoherty/archive/2007/10/12/getting-traction-with-sql-server-2008-filestream.aspx

Dave Ross
http://www.coldspringframework.org 




>> Now this is completely ridiculous: if you really need things 
>> like what's in EXIF, you extract it first and store it in an 
>> appropriate record about the file, just as well as width or 
>> height etc.
>> This does not justify storing all pixels and colors as well 
>> in the database.
>
>Perhaps this feature alone doesn't justify storing binary data within the
>database, but collectively, the advantages can outweigh the disadvantages.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>
>Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
>http://training.figleaf.com/
>
>WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
>http://www.webmaniacsconference.com/ 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301899
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfgridupdate doesn't work when I edit more than one Cell!

2008-03-24 Thread Gerald Guido
I have not used CF grid since 61 (java version). It was a bit dodgey back
then, I could not get it to update with a client on a Mac.

If you are on CF 8 check this out:
http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/

Ben Forta has a tute on his blog on using cfgrid to do crud on the fly.

hth,
G



On Mon, Mar 24, 2008 at 8:02 AM, Ali <[EMAIL PROTECTED]> wrote:

> Hi:
> I made a grid with cfgrid then I made an action page with cfgridupdate. It
> works when I change one cell but doesn't work when I change more than one
> cell! Here is the code:
>
> The page that contains grid : cfgridtets.cfm
> 
> 
> SELECT UserID, UserName, UserPassword, FistName, LastName, City,
> UserActive
> FROM Tbl_Users
>
> 
> SELECT *
> FROM Tbl_City
> 
>
> 
> 
> 
> Grid Page
> 
>
> 
>
>   method="Post"
>  name="GridForm">
>
>format="html"
>  insert="yes"
>  query="UsersGrid"
>  COLHEADERBOLD="Yes"
>  COLHEADERFONT="Tahoma"
>  SELECTMODE="EDIT"
>  width="400"
>  height="200"
>  DELETE="Yes"
>  DELETEBUTTON="Del?">
>   display="No">
>   name="UserName"
>  header="User Name">
>   name="UserPassword"
>  header="User Password">
>   select="Yes"
>  header="Fist Name"
>  headerAlign="RIGHT">
>
> 
>  values="#ValueList(rstest.CityName)#"
>  select="Yes"
>  header="City"
>  headerAlign="RIGHT">
>
> 
>  select="Yes"
>  header="User Active"
>  headerAlign="RIGHT">
> 
>
>
> 
> 
>
> 
> 
> 
>
>
> This is the page I use as an action page to cfgridupdate works:
> cfgridtestaction.cfm
>
>
> 
> http://www.w3.org/1999/xhtml";>
> 
> 
> Action Page
> 
>
> 
> 
>tableName="Tbl_Users"
>  grid="MYGRID">
> 
> 
> 
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301898
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Help setting up server file locations

2008-03-24 Thread Donald R Langley
I need some help configuring my server.  The server has dual drives a 30 
gig (C: drive) and a 180 gig (D; drive) .  Both are backed up by redundant 
drives.  What I want to do is to run the CF applications on the C drive 
and locate all of the uploaded photos, and files (word, excel, powerpoint 
stuff) on the D :  drive.This is to allow me to easily store the bulk 
of the app, which will be the uploaded Word, PPT, excel etc files on the 
larger drive and also to be able to upgrade the D: drive bigger if I have 
to without having to reload CF and all the app. 
I will have a need to access the files on the D : drive via  
links  and use cfupload to load new files within my CF app.
I can't figure out how to do it. 
Can anyone help me out? 
Thanks  Rob


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301897
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Any "Gotcha's" in using CF UUID for db record primary key?

2008-03-24 Thread Rick Faircloth
What's the reason for using the db instead of CF to
generate the UUID?  To keep the load off CF?

I was thinking I might use CF in the following manner to generate
a UUID for a record:

- Create UUID and variable to hold UUID via CF and cfset
- User completes form with textual information and photo selection via cffile
- Run insert query to create primary textual record, including inserting UUID
- Run second insert query to create records in photo table for each
  cffile field mentioned above, inserting UUID for relational key to textual 
information

After doing some reading in the MySQL 5 docs, it looks like I could use the
LAST_INSERT_ID() function to return the auto-incrementing primary key of the 
"main"
textual record of a property (Real Estate property), then run an insert query 
for the
photo records on another table, using the LAST_INSERT_ID() as the relational 
key to the
primary property table.

- User completes form with primary record info and selects photos
- Insert query runs creating primary property record
- Run another query to retrieve LAST_INSERT_ID() (or just use that value as a 
variable,
#LAST_INSERT_ID()# ???)
- Run another query to insert photos into photo table using LAST_INSERT_ID as 
relational key

Using LAST_INSERT_ID(), it seems that I could allow a single input form for two 
tables,
property and property_photos, create a more user-friendly work flow, and avoid 
the
"messiness" of UUID altogether.

Thoughts?

Rick


> -Original Message-
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: Sunday, March 23, 2008 11:48 PM
> To: CF-Talk
> Subject: RE: Any "Gotcha's" in using CF UUID for db record primary key?
> 
> > At the same time I kind of DON'T agree with them if you're
> > doing what we were doing: if you're using the key to link
> > tables (so that you can combine multiple databases easily)
> > and using them to link to non-DB information (log files, etc)
> > then it seems like extra work to do a "real" auto-increment
> > PK as well.
> 
> I'll second this. Either use UUIDs or don't. In either case, I'd recommend
> that you use your database's ability to generate these instead of doing it
> from CF.
> 
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> 
> Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
> http://training.figleaf.com/
> 
> WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
> http://www.webmaniacsconference.com/
> 
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301896
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Music previewing

2008-03-24 Thread Bobby Hartsfield
That's right... Flash Will and he will stream the music automatically like
you need ;-)

Ditto on Flash though. You can play an mp3 from a url for N seconds

-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 24, 2008 7:16 AM
To: CF-Talk
Subject: Re: Music previewing

>I am trying to get a temporary fix of having an embed object created
>dynamically through javascript and then using a settimeout to replace that
>object with a blank one that will 'stop' the music playing, but since the
>music isn't 'streaming' the song takes too much time to download to the
>users' machine before starting the playback.
> 

Flash will stream the music automatically like you need. 

Will 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301895
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cfgridupdate doesn't work when I edit more than one Cell!

2008-03-24 Thread Ali
Hi:
I made a grid with cfgrid then I made an action page with cfgridupdate. It
works when I change one cell but doesn't work when I change more than one
cell! Here is the code:

The page that contains grid : cfgridtets.cfm


SELECT UserID, UserName, UserPassword, FistName, LastName, City, UserActive
FROM Tbl_Users


SELECT *
FROM Tbl_City





Grid Page






 




















This is the page I use as an action page to cfgridupdate works:
cfgridtestaction.cfm



http://www.w3.org/1999/xhtml";>


Action Page




 





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301894
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: MS SQL DB Size

2008-03-24 Thread Jenny Gavin-Wear
In case anyone finds it useful.  This code updates a table with the db sizes
of all db's on the server.

Thanks for your help putting this together :-)



  





   #Datasources[i]#

 









update tbl_sites
set DBsize = #dbsize2#
where DBname = '#Datasources[i]#'








~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301893
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Music previewing

2008-03-24 Thread Will Tomlinson
>I am trying to get a temporary fix of having an embed object created
>dynamically through javascript and then using a settimeout to replace that
>object with a blank one that will 'stop' the music playing, but since the
>music isn't 'streaming' the song takes too much time to download to the
>users' machine before starting the playback.
> 

Flash will stream the music automatically like you need. 

Will 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301892
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Seeking Spreadsheet App Simulation in CF

2008-03-24 Thread Will Tomlinson
>Does anyone know of a tag or simple app that simulates a "spreadsheet"
>within a page. I am looking for only the simplest functionality that
>will enable users to input/update simple text data into a cell. 
>
>Rick

Sounds like more of a CSS thing to me. Stick some inputs in your cells and 
style the cells with CSS to mimic excel. 

Will 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301891
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


  1   2   >