re: What is wrong with this loop update?

2010-11-03 Thread Jason Fisher

What you want is this:


cfoutput query=GetExpOrg

(diagnostics) row: #currentrow# id: #ExpOrg_ID#br

cfquery datasource=#application.datasource# name=UpdateExpOrg
update Project_ExpOrg
set OrgValue=(select org_value from expressionorganism3 
where exporg_id = #ExpOrg_ID#)
where project_id = #url.ProjectId#
/cfquery

/cfoutput


Basically, the reference within the query to GetExpOrg.ExpOrg_ID is the 
equivalent to GetExpOrg.ExpOrg_ID[1] outside of a query output context, so 
you always got the first ID, I'm guessing.  CFLOOP sometimes does this, and 
you've found one example.



From: Rick Colman rcol...@cox.net
Sent: Tuesday, November 02, 2010 7:29 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: What is wrong with this loop update?

I am trying to update multiple rows by looping through:

cfloop query=GetExpOrg

(diagnostics) cfoutputrow: #GetExpOrg.currentrow# id: 
#GetExpOrg.ExpOrg_ID#/cfoutputbr

cfquery datasource=#application.datasource# name=UpdateExpOrg
update Project_ExpOrg
set OrgValue=(select org_value from expressionorganism3 
where exporg_id = #GetExpOrg.ExpOrg_ID#)
where project_id = #url.ProjectId#
/cfquery

/cfloop

my diagnostics give me:

row: 1 id: 2
row: 2 id: 693
so that is ok.

but both rows are updated with the last value (693) instead of being 
individually updated?

What's wrong with this?

TNX if you can help.

Rick.



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


Re: What is wrong with this loop update?

2010-11-02 Thread Charlie Griefer

You say you're trying to update multiple rows... but your WHERE is stating,
WHERE project_id = #URL.projectID#.

Since URL.projectID most likely isn't changing during the iteration of that
loop, you'll only ever be updating one row 'x' number of times.


On Tue, Nov 2, 2010 at 4:28 PM, Rick Colman rcol...@cox.net wrote:


 I am trying to update multiple rows by looping through:

 cfloop query=GetExpOrg

 (diagnostics) cfoutputrow: #GetExpOrg.currentrow# id:
 #GetExpOrg.ExpOrg_ID#/cfoutputbr

 cfquery datasource=#application.datasource# name=UpdateExpOrg
 update Project_ExpOrg
 set OrgValue=(select org_value from expressionorganism3
 where exporg_id = #GetExpOrg.ExpOrg_ID#)
 where project_id = #url.ProjectId#
 /cfquery

 /cfloop

 my diagnostics give me:

 row: 1 id: 2
 row: 2 id: 693
 so that is ok.

 but both rows are updated with the last value (693) instead of being
 individually updated?

 What's wrong with this?

 TNX if you can help.

 Rick.


 

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


Re: what is wrong with this code

2010-04-15 Thread morgan l

I think this'll work:
callURL = a  href='##' onClick='javascript:return
parent.frames[1].XYZ(\fileName\)'Link1/a;

On Thu, Apr 15, 2010 at 3:58 PM, fun and learning
funandlrnn...@gmail.comwrote:

 callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ(
 + fileName + )'Link1/a;


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332927
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread Jason Fisher

callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ(\ + 
fileName + \)'Link1/a;



On 4/15/2010 4:58 PM, fun and learning wrote:
 Hi All,

 I know this is coldfusion forum, but can any one tell me what I am missing to 
 make the fileName get within quotes in javascript. I am getting everything 
 right except in callURL, the fileName is sent as argument, but the real value 
 is not enclosed within quotes. I tried different combinations but its not 
 working. the actual callURL value when outputted should be

 a  href='##' onClick='javascript:return 
 parent.frames[1].XYZ(screen)'Link1/a  but the value I am getting right 
 now is
 a  href='##' onClick='javascript:return 
 parent.frames[1].XYZ(screen)'Link1/a

 Below is the code:

 function jscript1(){
 var theString = 'screen1.cfm'
   
 var fileName = theString.substring(0,theString.lastIndexOf(.));
   
 callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ( + 
 fileName + )'Link1/a;
 }

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332928
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread fun and learning

I think this'll work:
callURL = a  href='##' onClick='javascript:return
parent.frames[1].XYZ(\fileName\)'Link1/a;

On Thu, Apr 15, 2010 at 3:58 PM, fun and learning
funandlrnn...@gmail.comwrote:

 callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ(
 + fileName + )'Link1/a;

Well, it does not display the value, it displays the variable name..



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332929
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread fun and learning

 callURL = a  href='##' onClick='javascript:return parent.frames[1].
 XYZ(\ + fileName + \)'Link1/a;
 
 Does not work..Shows syntax error.
 
 On 4/15/2010 4:58 PM, fun and learning wrote:
  Hi All,
 
  I know this is coldfusion forum, but can any one tell me what I am 
 missing to make the fileName get within quotes in javascript. I am 
 getting everything right except in callURL, the fileName is sent as 
 argument, but the real value is not enclosed within quotes. I tried 
 different combinations but its not working. the actual callURL value 
 when outputted should be
 
  a  href='##' onClick='javascript:return parent.frames[1].
 XYZ(screen)'Link1/a  but the value I am getting right now is
  a  href='##' onClick='javascript:return parent.frames[1].
 XYZ(screen)'Link1/a
 
  Below is the code:
 
  function jscript1(){
  var theString = 'screen1.cfm'
  
  var fileName = theString.substring(0,theString.lastIndexOf(.));
  
  callURL = a  href='##' onClick='javascript:return parent.frames[1].
 XYZ( + fileName + )'Link1/a;
  }
 
  


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332930
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread morgan l

Oops, put the +'s back in:
callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ(\
+ fileName + \)'Link1/a;

On Thu, Apr 15, 2010 at 4:07 PM, fun and learning
funandlrnn...@gmail.comwrote:


 I think this'll work:
 callURL = a  href='##' onClick='javascript:return
 parent.frames[1].XYZ(\fileName\)'Link1/a;
 
 On Thu, Apr 15, 2010 at 3:58 PM, fun and learning
 funandlrnn...@gmail.comwrote:
 
  callURL = a  href='##' onClick='javascript:return
 parent.frames[1].XYZ(
  + fileName + )'Link1/a;

 Well, it does not display the value, it displays the variable name..



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332931
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread Jason Fisher

This works for me:

 function jscript1(){
 var theString = screen1.cfm;

 var fileName = theString.substring(0,theString.lastIndexOf(.));

 callURL = a href=\##\ onclick=\javascript:return 
parent.frames[1].XYZ(\' + fileName + \')\Link1/a;

 alert(callURL);
 }

On 4/15/2010 5:14 PM, fun and learning wrote:

 callURL = a  href='##' onClick='javascript:return parent.frames[1].
 XYZ(\ + fileName + \)'Link1/a;

 Does not work..Shows syntax error.

 On 4/15/2010 4:58 PM, fun and learning wrote:
  
 Hi All,

 I know this is coldfusion forum, but can any one tell me what I am

 missing to make the fileName get within quotes in javascript. I am
 getting everything right except in callURL, the fileName is sent as
 argument, but the real value is not enclosed within quotes. I tried
 different combinations but its not working. the actual callURL value
 when outputted should be
  
 a  href='##' onClick='javascript:return parent.frames[1].

 XYZ(screen)'Link1/a   but the value I am getting right now is
  
 a  href='##' onClick='javascript:return parent.frames[1].

 XYZ(screen)'Link1/a
  
 Below is the code:

 function jscript1(){
 var theString = 'screen1.cfm'
 
 var fileName = theString.substring(0,theString.lastIndexOf(.));
 
 callURL = a  href='##' onClick='javascript:return parent.frames[1].

 XYZ( + fileName + )'Link1/a;
  
 }




 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332932
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread fun and learning

Oops, put the +'s back in:
callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ(\
+ fileName + \)'Link1/a;

On Thu, Apr 15, 2010 at 4:07 PM, fun and learning
funandlrnn...@gmail.comwrote:



Nope, it displays the following
a  href='##' onClick='javascript:return parent.frames[1].XYZ(
+ fileName + )'Link1/a 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332933
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread funand learning

Hey Jason,

It works for me too...Thanks a lot...

On Thu, Apr 15, 2010 at 5:29 PM, Jason Fisher ja...@wanax.com wrote:


 This works for me:

 function jscript1(){
 var theString = screen1.cfm;

 var fileName = theString.substring(0,theString.lastIndexOf(.));

 callURL = a href=\##\ onclick=\javascript:return
 parent.frames[1].XYZ(\' + fileName + \')\Link1/a;

 alert(callURL);
  }

 On 4/15/2010 5:14 PM, fun and learning wrote:
 
  callURL = a  href='##' onClick='javascript:return parent.frames[1].
  XYZ(\ + fileName + \)'Link1/a;
 
  Does not work..Shows syntax error.
 
  On 4/15/2010 4:58 PM, fun and learning wrote:
 
  Hi All,
 
  I know this is coldfusion forum, but can any one tell me what I am
 
  missing to make the fileName get within quotes in javascript. I am
  getting everything right except in callURL, the fileName is sent as
  argument, but the real value is not enclosed within quotes. I tried
  different combinations but its not working. the actual callURL value
  when outputted should be
 
  a  href='##' onClick='javascript:return parent.frames[1].
 
  XYZ(screen)'Link1/a   but the value I am getting right now is
 
  a  href='##' onClick='javascript:return parent.frames[1].
 
  XYZ(screen)'Link1/a
 
  Below is the code:
 
  function jscript1(){
  var theString = 'screen1.cfm'
 
  var fileName = theString.substring(0,theString.lastIndexOf(.));
 
  callURL = a  href='##' onClick='javascript:return parent.frames[1].
 
  XYZ( + fileName + )'Link1/a;
 
  }
 
 
 
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332934
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: what is wrong with this code

2010-04-15 Thread Bobby Hartsfield

jsStringFormat() the callURL. It will take care of escaping everything
correctly.


-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Thursday, April 15, 2010 5:26 PM
To: cf-talk
Subject: Re: what is wrong with this code


Oops, put the +'s back in:
callURL = a  href='##' onClick='javascript:return parent.frames[1].XYZ(\
+ fileName + \)'Link1/a;

On Thu, Apr 15, 2010 at 4:07 PM, fun and learning
funandlrnn...@gmail.comwrote:



Nope, it displays the following
a  href='##' onClick='javascript:return parent.frames[1].XYZ(
+ fileName + )'Link1/a 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332935
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: what is wrong with this code

2010-04-15 Thread morgan l

My brain is fried, it's late. I needed to escape the quotes, then terminate
the string, then insert the variables, then restart the string, then escape
the closing quotes:
callURL = a  href='##' onClick='javascript:return
parent.frames[1].XYZ(\ + fileName + \)'Link1/a;

On Thu, Apr 15, 2010 at 4:26 PM, fun and learning
funandlrnn...@gmail.comwrote:


 Oops, put the +'s back in:
 callURL = a  href='##' onClick='javascript:return
 parent.frames[1].XYZ(\
 + fileName + \)'Link1/a;
 
 On Thu, Apr 15, 2010 at 4:07 PM, fun and learning
 funandlrnn...@gmail.comwrote:
 
 

 Nope, it displays the following
 a  href='##' onClick='javascript:return parent.frames[1].XYZ(
 + fileName + )'Link1/a

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332936
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: What is wrong with this?

2007-03-14 Thread Dinner
No no! Do int() instead, and keep the change!  It's classic!

*sigh* sorry folks, had to.  Poor Impulse Control.  =]


~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

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


Re: What is wrong with this?

2007-03-13 Thread Christopher Jordan
BlueDragon is only $899 give or take, and is an excellent parser! :o)

Chris

Rick Faircloth wrote:
 if you'd upgraded to
 CF 7, which won't complain about a mask being too short.
 

 I know, I know.. but so far, that's the only thing I know
 I've missed.  :oP  (Not worth $1300!) :o)

 Rick

 -Original Message-
 From: Dave Watts [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 8:51 PM
 To: CF-Talk
 Subject: RE: What is wrong with this?

   
 I tried that...

 I used #NumberFormat(Trim(Get_Property_Details.Sale_Price),
 999)#
 and it didn't throw an error, but it put about 4 blanks 
 spaces in the form field.
 

 Put the Trim on the outside?

 Just to taunt you a bit, you wouldn't have this problem if you'd upgraded to
 CF 7, which won't complain about a mask being too short.

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

 Fig Leaf Software provides the highest caliber vendor-authorized
 instruction at our training centers in Washington DC, Atlanta,
 Chicago, Baltimore, Northern Virginia, or on-site at your location.
 Visit http://training.figleaf.com/ for more information!

 This email has been processed by SmoothZap - www.smoothwall.net




 

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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


Re: What is wrong with this?

2007-03-13 Thread Dean Lawrence
Rick,

If the number has to be an integer, why is it being stored in the
database as a decimal? Wouldn't just changing the fieldtype be the
most logical thing to do instead of having to build code to compensate
for it?

Just at thought.

Dean

-- 
__
Dean Lawrence, CIO/Partner
Internet Data Technology
888.GET.IDT1 ext. 701 * fax: 888.438.4381
http://www.idatatech.com/
Corporate Internet Development and Marketing Specialists

~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-13 Thread Rick Faircloth
Hi, Dean...

Well, off the top of my head.. I figure the Real Estate agents
would want to be able to enter dollars and cents. (Even though
there's never anything but zeros after the decimals.)  It just looks
more consistent with what you see as prices on Real Estate sites.

I guess the idea is to keep things the most flexible possible for
the agents and give them less to complain about with entry.
I just do more work on my end, but in the long run it's easier on me.

Rick


-Original Message-
From: Dean Lawrence [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 13, 2007 1:05 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Rick,

If the number has to be an integer, why is it being stored in the
database as a decimal? Wouldn't just changing the fieldtype be the
most logical thing to do instead of having to build code to compensate
for it?

Just at thought.

Dean

-- 
__
Dean Lawrence, CIO/Partner
Internet Data Technology
888.GET.IDT1 ext. 701 * fax: 888.438.4381
http://www.idatatech.com/
Corporate Internet Development and Marketing Specialists



~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

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


Re: What is wrong with this?

2007-03-13 Thread Dinner
I hear ralio is even cheaper-- but faster, stronger... more manly.  :-))

On 3/13/07, Christopher Jordan wrote:
 BlueDragon is only $899 give or take, and is an excellent parser! :o)

 Chris

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

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


RE: What is wrong with this?

2007-03-13 Thread Rick Faircloth
Not cheaper if you're hosting quite a few sites...which I am.

I've considered it, but it would cost more, I think than CF Pro
with the additional licenses.  If the cost were half of what
CF Pro is with unlimited hosting, I'd consider it.  But as is,
it doesn't have all the functionality (at least last time I checked)
and there's no need to pay more for less!

Rick



-Original Message-
From: Dinner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 13, 2007 8:32 PM
To: CF-Talk
Subject: Re: What is wrong with this?

I hear ralio is even cheaper-- but faster, stronger... more manly.  :-))

On 3/13/07, Christopher Jordan wrote:
 BlueDragon is only $899 give or take, and is an excellent parser! :o)

 Chris





~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

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


Re: What is wrong with this?

2007-03-13 Thread Dean Lawrence
Gotcha,

I didn't realized that they were prices that they were entering. It
makes sense then that you are having to jump through the extra hoops.

Dean

On 3/13/07, Rick Faircloth [EMAIL PROTECTED] wrote:
 Hi, Dean...

 Well, off the top of my head.. I figure the Real Estate agents
 would want to be able to enter dollars and cents. (Even though
 there's never anything but zeros after the decimals.)  It just looks
 more consistent with what you see as prices on Real Estate sites.

 I guess the idea is to keep things the most flexible possible for
 the agents and give them less to complain about with entry.
 I just do more work on my end, but in the long run it's easier on me.

 Rick


 -Original Message-
 From: Dean Lawrence [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 13, 2007 1:05 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Rick,

 If the number has to be an integer, why is it being stored in the
 database as a decimal? Wouldn't just changing the fieldtype be the
 most logical thing to do instead of having to build code to compensate
 for it?

 Just at thought.

 Dean

 --
 __
 Dean Lawrence, CIO/Partner
 Internet Data Technology
 888.GET.IDT1 ext. 701 * fax: 888.438.4381
 http://www.idatatech.com/
 Corporate Internet Development and Marketing Specialists



 

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

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


Re: What is wrong with this?

2007-03-13 Thread Andrew Scott
I would have suggested Ceiling a long time ago if you described then what
you had been trying to achieve to begin with. Also for the others with
masking, you can do this as a maks _999 and if the number goes over 3 in
length it will not matter, so you do not need to write code to format the
string to your desired length, and if you want a $ in there just do
$_.99

Simple when you actually read the tags usage and read about masks:-)

but Rick, yeah ceiling is your friend in this case.



On 3/13/07, Rick Faircloth [EMAIL PROTECTED] wrote:

 And we have a winner!

 Ceiling is perfect for the job!

 Thanks, Josh and everyone for the help... I think this turned
 out to be worse than trying to solve the original
 js validation issue!  :oP

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 6:05 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 That mask is supposed to round the number up to the
 near who number, or, in this case, 255900

 I would argue that since you're trying to round a decimal up to the next
 highest integer, Ceiling is the appropriate function, since that is
 exactly
 the intent of that function.  NumberFormat can be used of course, but its
 intent is different, and the implementation is more difficult.

 -- Josh





 

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

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


Re: What is wrong with this?

2007-03-12 Thread Scott Weikert
Rick Faircloth wrote:
 I'm getting an invalid format mask on this:

 Value=#NumberFormat(Get_Property_Details.Sale_Price, )#
   
Is Get_Property_Details.Sale_Price a number? Or, since it's obviously 
intended as an amount of money, does the value have something else in 
it, like a dollar sign?

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


Re: What is wrong with this?

2007-03-12 Thread Ken Wexel
looks fine...what's the value being returned in your var?

On 3/12/07, Rick Faircloth [EMAIL PROTECTED] wrote:
 Hi, all...

 I'm getting an invalid format mask on this:

 Value=#NumberFormat(Get_Property_Details.Sale_Price, )#

 Why?

 Thanks,

 Rick





 

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Josh Nathanson
Try using single quotes around the .

-- Josh


- Original Message - 
From: Rick Faircloth [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 12, 2007 1:31 PM
Subject: What is wrong with this?


 Hi, all...

 I'm getting an invalid format mask on this:

 Value=#NumberFormat(Get_Property_Details.Sale_Price, )#

 Why?

 Thanks,

 Rick





 

~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


Re: What is wrong with this?

2007-03-12 Thread Ashish Gohri
Something like this works - 
cfset a = NumberFormat(1234567,)

So problem is with the first arguement - Get_Property_Details.Sale_Price

Check if its a valid number, use IsNumeric to check that.  Also check for NULL 
value.

Thanks,
Ashish Gohri



Hi, all...

I'm getting an invalid format mask on this:

Value=#NumberFormat(Get_Property_Details.Sale_Price, )#

Why?

Thanks,

Rick

~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
It's type is decimal in MySQL and the particular value
being formatted is 255900 in the database...no dollar signs,
commas, or periods.

Rick

-Original Message-
From: Scott Weikert [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 4:53 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Rick Faircloth wrote:
 I'm getting an invalid format mask on this:

 Value=#NumberFormat(Get_Property_Details.Sale_Price, )#
   
Is Get_Property_Details.Sale_Price a number? Or, since it's obviously 
intended as an amount of money, does the value have something else in 
it, like a dollar sign?




~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
It's a decimal type in MySQL and the particular
value being processed here is 255900 without
and dollar signs, commas, or periods.

Rick

-Original Message-
From: Ken Wexel [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 4:56 PM
To: CF-Talk
Subject: Re: What is wrong with this?

looks fine...what's the value being returned in your var?

On 3/12/07, Rick Faircloth [EMAIL PROTECTED] wrote:
 Hi, all...

 I'm getting an invalid format mask on this:

 Value=#NumberFormat(Get_Property_Details.Sale_Price, )#

 Why?

 Thanks,

 Rick





 



~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
That was the first thing I tried...didn't help.

Strange...

Rick

-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 4:56 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Try using single quotes around the .

-- Josh





~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Josh Nathanson
If you just cfoutput #Get_Property_Details.Sale_Price#, what does it say?

-- Josh


- Original Message - 
From: Rick Faircloth [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 12, 2007 2:05 PM
Subject: RE: What is wrong with this?


 That was the first thing I tried...didn't help.

 Strange...

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 4:56 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Try using single quotes around the .

 -- Josh





 

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
It coming back as a numeric value...

Rick

-Original Message-
From: Ashish Gohri [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 4:50 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Something like this works - 
cfset a = NumberFormat(1234567,)

So problem is with the first arguement - Get_Property_Details.Sale_Price

Check if its a valid number, use IsNumeric to check that.  Also check for
NULL value.

Thanks,
Ashish Gohri





~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Ben Nadel
Trim it... Might be white space. 


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/


-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:13 PM
To: CF-Talk
Subject: RE: What is wrong with this?

It coming back as a numeric value...

Rick

-Original Message-
From: Ashish Gohri [mailto:[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 4:50 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Something like this works -
cfset a = NumberFormat(1234567,)

So problem is with the first arguement - Get_Property_Details.Sale_Price

Check if its a valid number, use IsNumeric to check that.  Also check
for NULL value.

Thanks,
Ashish Gohri







~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
255900.00

It's showing in the database as 255900
but because it's a decimal data type, the .00 is being
tacked on the end.

Rick

-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:10 PM
To: CF-Talk
Subject: Re: What is wrong with this?

If you just cfoutput #Get_Property_Details.Sale_Price#, what does it say?

-- Josh


- Original Message - 
From: Rick Faircloth [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 12, 2007 2:05 PM
Subject: RE: What is wrong with this?


 That was the first thing I tried...didn't help.

 Strange...

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 4:56 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Try using single quotes around the .

 -- Josh





 



~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
#NumberFormat(Trim(Get_Property_Details.Sale_Price), )#
still causes Invalid Mask error...



-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:19 PM
To: CF-Talk
Subject: RE: What is wrong with this?

Trim it... Might be white space. 





~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Jim Wright
Ashish Gohri wrote:
 Something like this works - 
 cfset a = NumberFormat(1234567,)
 

I believe in older CF versions (5 maybe, 4.5 for sure), you had to have 
as many places (or more) in your mask as you had in the number it is 
formatting.  Is this a older version of CF?

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Josh Nathanson
If you have the number 255900.00, how do you want to end up looking?  I 
don't know NumberFormat very well, but I'm not sure what you're trying to 
get by masking it with .

-- Josh


- Original Message - 
From: Rick Faircloth [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 12, 2007 2:23 PM
Subject: RE: What is wrong with this?


 255900.00

 It's showing in the database as 255900
 but because it's a decimal data type, the .00 is being
 tacked on the end.

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 5:10 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 If you just cfoutput #Get_Property_Details.Sale_Price#, what does it say?

 -- Josh


 - Original Message - 
 From: Rick Faircloth [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Monday, March 12, 2007 2:05 PM
 Subject: RE: What is wrong with this?


 That was the first thing I tried...didn't help.

 Strange...

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 4:56 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Try using single quotes around the .

 -- Josh









 

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
That mask is supposed to round the number up to the
near who number, or, in this case, 255900


-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:31 PM
To: CF-Talk
Subject: Re: What is wrong with this?

If you have the number 255900.00, how do you want to end up looking?  I 
don't know NumberFormat very well, but I'm not sure what you're trying to 
get by masking it with .

-- Josh






~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Ben Nadel
What happens if you use zeros instead of nines 

#NumberFormat(Trim(Get_Property_Details.Sale_Price), )#


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:28 PM
To: CF-Talk
Subject: RE: What is wrong with this?

#NumberFormat(Trim(Get_Property_Details.Sale_Price), )# still
causes Invalid Mask error...


~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
That got me closer, Jim.

I tried #NumberFormat(Trim(Get_Property_Details.Sale_Price),
999)#
and it did take off the decimal and rounded the number to 255900, however
the 255900 was then preceded by about 4 blank spaces in the form field.

And to think I was trying to round the number to help overcome
a problem with JS validation!  :oP

Rick

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:29 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Ashish Gohri wrote:
 Something like this works - 
 cfset a = NumberFormat(1234567,)
 

I believe in older CF versions (5 maybe, 4.5 for sure), you had to have 
as many places (or more) in your mask as you had in the number it is 
formatting.  Is this a older version of CF?





~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

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


Re: What is wrong with this?

2007-03-12 Thread Christopher Jordan
Rick,

As a test, have you tried replacing Get_Property_Details.Sale_Price with 
a hard-coded value? Also, have you tried changing your mask to .99 
(or don't you want the decimal to show)?

Chris

Rick Faircloth wrote:
 255900.00

 It's showing in the database as 255900
 but because it's a decimal data type, the .00 is being
 tacked on the end.

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 5:10 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 If you just cfoutput #Get_Property_Details.Sale_Price#, what does it say?

 -- Josh


 - Original Message - 
 From: Rick Faircloth [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Monday, March 12, 2007 2:05 PM
 Subject: RE: What is wrong with this?


   
 That was the first thing I tried...didn't help.

 Strange...

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 4:56 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Try using single quotes around the .

 -- Josh






 



 

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
Yep... CF 4.5...however, the mask instructions
are straight out of the 4.0 WACK...


-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:29 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Ashish Gohri wrote:
 Something like this works - 
 cfset a = NumberFormat(1234567,)
 

I believe in older CF versions (5 maybe, 4.5 for sure), you had to have 
as many places (or more) in your mask as you had in the number it is 
formatting.  Is this a older version of CF?





~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
The masking does work correctly if I have the *exact*
number of nines as the masked number has digits to the
left of the decimal.

But that's not going to work, because there's no way to tell
what number of digits there will be for any given property!

Rick

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:29 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Ashish Gohri wrote:
 Something like this works - 
 cfset a = NumberFormat(1234567,)
 

I believe in older CF versions (5 maybe, 4.5 for sure), you had to have 
as many places (or more) in your mask as you had in the number it is 
formatting.  Is this a older version of CF?





~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


Re: What is wrong with this?

2007-03-12 Thread Christopher Jordan
Here's what the help says about 9's .'s and 0's...

9
Optional. Digit placeholder. (Shows decimal places more clearly than _.)
..
Location of a mandatory decimal point.
0
Located to the left or right of a mandatory decimal point. Pads with 
zeros.


so zero is used to pad left or right of the decimal...

Chris

Ben Nadel wrote:
 What happens if you use zeros instead of nines 

 #NumberFormat(Trim(Get_Property_Details.Sale_Price), )#


 ..
 Ben Nadel
 Certified Advanced ColdFusion MX7 Developer
 www.bennadel.com
  
 Need ColdFusion Help?
 www.bennadel.com/ask-ben/

 -Original Message-
 From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 5:28 PM
 To: CF-Talk
 Subject: RE: What is wrong with this?

 #NumberFormat(Trim(Get_Property_Details.Sale_Price), )# still
 causes Invalid Mask error...


 

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Josh Nathanson
In that case, you could use #Ceiling(Get_Property_Details.Sale_Price)#

But, it would still be interesting to figure out why NumberFormat isn't 
working...probably what Jim said about older versions of CF.

-- Josh


- Original Message - 
From: Rick Faircloth [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 12, 2007 2:40 PM
Subject: RE: What is wrong with this?


 That mask is supposed to round the number up to the
 near who number, or, in this case, 255900


 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 5:31 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 If you have the number 255900.00, how do you want to end up looking?  I
 don't know NumberFormat very well, but I'm not sure what you're trying to
 get by masking it with .

 -- Josh






 

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
No, I don't want the decimal.  That way my only reason
for using the mask.  The presence of the decimal violates
a digits only rule in the jQuery javascript validation I'm using on the
form fields.  So, I thought I'd just strip it out with the NumberFormat
function...

-Original Message-
From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:43 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Rick,

As a test, have you tried replacing Get_Property_Details.Sale_Price with 
a hard-coded value? Also, have you tried changing your mask to .99 
(or don't you want the decimal to show)?

Chris

Rick Faircloth wrote:
 255900.00

 It's showing in the database as 255900
 but because it's a decimal data type, the .00 is being
 tacked on the end.

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 5:10 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 If you just cfoutput #Get_Property_Details.Sale_Price#, what does it say?

 -- Josh


 - Original Message - 
 From: Rick Faircloth [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Monday, March 12, 2007 2:05 PM
 Subject: RE: What is wrong with this?


   
 That was the first thing I tried...didn't help.

 Strange...

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 12, 2007 4:56 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Try using single quotes around the .

 -- Josh






 



 



~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

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


Re: What is wrong with this?

2007-03-12 Thread Christopher Jordan
Rick,

I don't think it really rounds so much as it truncates everything 
after the decimal.

Chris

Rick Faircloth wrote:
 That mask is supposed to round the number up to the
 near who number, or, in this case, 255900


 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 5:31 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 If you have the number 255900.00, how do you want to end up looking?  I 
 don't know NumberFormat very well, but I'm not sure what you're trying to 
 get by masking it with .

 -- Josh






 

~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Dave Watts
 The masking does work correctly if I have the *exact* number 
 of nines as the masked number has digits to the left of the decimal.
 
 But that's not going to work, because there's no way to tell 
 what number of digits there will be for any given property!

Doesn't it work if you have more digits in the mask than in the actual
value?

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net


~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
Same problem, Ben...

-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:42 PM
To: CF-Talk
Subject: RE: What is wrong with this?

What happens if you use zeros instead of nines 

#NumberFormat(Trim(Get_Property_Details.Sale_Price), )#


...
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 




~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Dawson, Michael
Untrue.  Use len() on the value, then use repeatString() to set the
proper number of 9s in the numberFormat() function.  Completely dynamic.

M!ke 

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 4:45 PM
To: CF-Talk
Subject: RE: What is wrong with this?

The masking does work correctly if I have the *exact* number of nines as
the masked number has digits to the left of the decimal.

But that's not going to work, because there's no way to tell what number
of digits there will be for any given property!

Rick

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
I wouldn't want to pad the number.  That would be
harder to read for the user.

255900

???

Rick

-Original Message-
From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:49 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Here's what the help says about 9's .'s and 0's...

9
Optional. Digit placeholder. (Shows decimal places more clearly than
_.)
...
Location of a mandatory decimal point.
0
Located to the left or right of a mandatory decimal point. Pads with

zeros.


so zero is used to pad left or right of the decimal...

Chris





~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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


Re: What is wrong with this?

2007-03-12 Thread Jim Wright
Rick Faircloth wrote:
 That got me closer, Jim.
 
 I tried #NumberFormat(Trim(Get_Property_Details.Sale_Price),
 999)#
 and it did take off the decimal and rounded the number to 255900, however
 the 255900 was then preceded by about 4 blank spaces in the form field.
 

Yeah...now that I think about it, that is probably one of the main 
reasons I still have a custom numberformat tag in use at one of my 
clients (last 4.5 holdout).  The last thing it does is trim the output.

You could just do it in the query...something like...
CAST(Sale_Price AS integer)

~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Josh Nathanson
That mask is supposed to round the number up to the
near who number, or, in this case, 255900

I would argue that since you're trying to round a decimal up to the next 
highest integer, Ceiling is the appropriate function, since that is exactly 
the intent of that function.  NumberFormat can be used of course, but its 
intent is different, and the implementation is more difficult.

-- Josh 


~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
What Jim says seems to be true, but I can't imagine
that the function, in that form, was usable unless you 
always knew the number of digits to the left of the decimal!

I guess I could set something up to check the number for
digits to the left of the decimal and then set up some
cfif's or cfcase/cfswitch... but that seems a little ridiculous
to have to jump through those hoops.

Rick

-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:48 PM
To: CF-Talk
Subject: Re: What is wrong with this?

In that case, you could use #Ceiling(Get_Property_Details.Sale_Price)#

But, it would still be interesting to figure out why NumberFormat isn't 
working...probably what Jim said about older versions of CF.

-- Josh





~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
The 4.0 WACK states that since no decimal is specified in the mask,
the number is rounded to the nearest integer.


-Original Message-
From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:50 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Rick,

I don't think it really rounds so much as it truncates everything 
after the decimal.

Chris





~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
I tried that...

I used #NumberFormat(Trim(Get_Property_Details.Sale_Price),
999)#
and it didn't throw an error, but it put about 4 blanks spaces in the form
field.


-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 6:53 PM
To: CF-Talk
Subject: RE: What is wrong with this?

 The masking does work correctly if I have the *exact* number 
 of nines as the masked number has digits to the left of the decimal.
 
 But that's not going to work, because there's no way to tell 
 what number of digits there will be for any given property!

Doesn't it work if you have more digits in the mask than in the actual
value?

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





~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
Yes, it appears that there will have to be a determination
of the number of digits to the left of the decimal for this
to work.

I was saying that it won't work unless there is some further
computation to determine the exact number of 9's needed.
It seems they would have built that functionality into the
function itself...

Yes, I'm ready for CF 8!  What happened to the summer release!  Aaaahhh!


-Original Message-
From: Dawson, Michael [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 5:54 PM
To: CF-Talk
Subject: RE: What is wrong with this?

Untrue.  Use len() on the value, then use repeatString() to set the
proper number of 9s in the numberFormat() function.  Completely dynamic.

M!ke 





~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
 You could just do it in the query...something like...
 CAST(Sale_Price AS integer)

That would probably be the easiest solution...

Rick

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 6:04 PM
To: CF-Talk
Subject: Re: What is wrong with this?

Rick Faircloth wrote:
 That got me closer, Jim.
 
 I tried #NumberFormat(Trim(Get_Property_Details.Sale_Price),
 999)#
 and it did take off the decimal and rounded the number to 255900, however
 the 255900 was then preceded by about 4 blank spaces in the form field.
 

Yeah...now that I think about it, that is probably one of the main 
reasons I still have a custom numberformat tag in use at one of my 
clients (last 4.5 holdout).  The last thing it does is trim the output.

You could just do it in the query...something like...
CAST(Sale_Price AS integer)



~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


Re: What is wrong with this?

2007-03-12 Thread Christopher Jordan
In that case Rick, try something like this:

cfset NumberOfDigits = Len(Get_Property_Details.Sale_Price)

CFOutput
#NumberFormat(Get_Property_Details.Sale_Price, RepeatString(9, 
NumberOfDigits))#
/CFOutput

or whatever... :o)

I think RepeatString works in 4.5... I hope this helps.

Chris



Rick Faircloth wrote:
 The masking does work correctly if I have the *exact*
 number of nines as the masked number has digits to the
 left of the decimal.

 But that's not going to work, because there's no way to tell
 what number of digits there will be for any given property!

 Rick

 -Original Message-
 From: Jim Wright [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 5:29 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 Ashish Gohri wrote:
   
 Something like this works - 
 cfset a = NumberFormat(1234567,)

 

 I believe in older CF versions (5 maybe, 4.5 for sure), you had to have 
 as many places (or more) in your mask as you had in the number it is 
 formatting.  Is this a older version of CF?





 

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
And we have a winner!

Ceiling is perfect for the job!

Thanks, Josh and everyone for the help... I think this turned
out to be worse than trying to solve the original
js validation issue!  :oP

Rick

-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 6:05 PM
To: CF-Talk
Subject: Re: What is wrong with this?

That mask is supposed to round the number up to the
near who number, or, in this case, 255900

I would argue that since you're trying to round a decimal up to the next 
highest integer, Ceiling is the appropriate function, since that is exactly 
the intent of that function.  NumberFormat can be used of course, but its 
intent is different, and the implementation is more difficult.

-- Josh 





~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this?

2007-03-12 Thread Christopher Jordan
*sniff* I wanted to win! ;o)

Cheers mate!
Chris

Rick Faircloth wrote:
 And we have a winner!

 Ceiling is perfect for the job!

 Thanks, Josh and everyone for the help... I think this turned
 out to be worse than trying to solve the original
 js validation issue!  :oP

 Rick

 -Original Message-
 From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 6:05 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

   
 That mask is supposed to round the number up to the
 near who number, or, in this case, 255900
 

 I would argue that since you're trying to round a decimal up to the next 
 highest integer, Ceiling is the appropriate function, since that is exactly 
 the intent of that function.  NumberFormat can be used of course, but its 
 intent is different, and the implementation is more difficult.

 -- Josh 





 

~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
Thanks for the code, Chris, but, as you've probably
seen in my previous reply, the Ceiling function appears
to do exactly what I'm after...

Rick

-Original Message-
From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 6:21 PM
To: CF-Talk
Subject: Re: What is wrong with this?

In that case Rick, try something like this:

cfset NumberOfDigits = Len(Get_Property_Details.Sale_Price)

CFOutput
#NumberFormat(Get_Property_Details.Sale_Price, RepeatString(9,
NumberOfDigits))#
/CFOutput

.or whatever... :o)

I think RepeatString works in 4.5... I hope this helps.

Chris






~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2

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


Re: What is wrong with this?

2007-03-12 Thread Christopher Jordan
I'm just teasing Rick. I'm glad you got your answer. :o)

Chris

Rick Faircloth wrote:
 Thanks for the code, Chris, but, as you've probably
 seen in my previous reply, the Ceiling function appears
 to do exactly what I'm after...

 Rick

 -Original Message-
 From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 6:21 PM
 To: CF-Talk
 Subject: Re: What is wrong with this?

 In that case Rick, try something like this:

 cfset NumberOfDigits = Len(Get_Property_Details.Sale_Price)

 CFOutput
 #NumberFormat(Get_Property_Details.Sale_Price, RepeatString(9,
 NumberOfDigits))#
 /CFOutput

 .or whatever... :o)

 I think RepeatString works in 4.5... I hope this helps.

 Chris






 

~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
 *sniff* I wanted to win! ;o)

I know you did, Chris...but we grow in character
through disappointment!  :o)

Rick

-Original Message-
From: Christopher Jordan [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 6:28 PM
To: CF-Talk
Subject: Re: What is wrong with this?

*sniff* I wanted to win! ;o)

Cheers mate!
Chris





~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Dave Watts
 I tried that...
 
 I used #NumberFormat(Trim(Get_Property_Details.Sale_Price),
 999)#
 and it didn't throw an error, but it put about 4 blanks 
 spaces in the form field.

Put the Trim on the outside?

Just to taunt you a bit, you wouldn't have this problem if you'd upgraded to
CF 7, which won't complain about a mask being too short.

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net


~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
Oh, and you did notice that CF 4.5 had a *perfect* solution, didn't you? :o)
I just didn't know about Ceiling...

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 8:51 PM
To: CF-Talk
Subject: RE: What is wrong with this?

 I tried that...
 
 I used #NumberFormat(Trim(Get_Property_Details.Sale_Price),
 999)#
 and it didn't throw an error, but it put about 4 blanks 
 spaces in the form field.

Put the Trim on the outside?

Just to taunt you a bit, you wouldn't have this problem if you'd upgraded to
CF 7, which won't complain about a mask being too short.

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net




~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: What is wrong with this?

2007-03-12 Thread Rick Faircloth
 if you'd upgraded to
 CF 7, which won't complain about a mask being too short.

I know, I know.. but so far, that's the only thing I know
I've missed.  :oP  (Not worth $1300!) :o)

Rick

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 8:51 PM
To: CF-Talk
Subject: RE: What is wrong with this?

 I tried that...
 
 I used #NumberFormat(Trim(Get_Property_Details.Sale_Price),
 999)#
 and it didn't throw an error, but it put about 4 blanks 
 spaces in the form field.

Put the Trim on the outside?

Just to taunt you a bit, you wouldn't have this problem if you'd upgraded to
CF 7, which won't complain about a mask being too short.

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

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net




~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/

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


Re: What is wrong with this function

2006-12-14 Thread arthur amanyire
i am developing a real estate app and i have 3 submits(insert,update 
and delete ) on one cf flash form can some one give me code to manipulate 
the data base with these submits without using flash remoting


~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


RE: What is wrong with this function

2006-12-14 Thread Coldfusion
INSERT:
cfquery name=addit datasource=mydbinsert into mytable (fieldone)
values ('somevalue')/cfquery

UPDATE
cfquery name=updateit datasource=mydbupdate mytable set fieldone =
'NewValue' where myID = 1/cfquery

DELETE
cfquery name=deleteit datasource=mydbdelete from mytable where myID =
1/cfquery


That is 3 queries for you to use however they are real generic. So you will
need to tweak them.
Now if there is something else you need, you need to provide more details.

-Original Message-
From: arthur amanyire [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 4:16 AM
To: CF-Talk
Subject: Re: What is wrong with this function

i am developing a real estate app and i have 3 submits(insert,update and
delete ) on one cf flash form can some one give me code to manipulate the
data base with these submits without using flash remoting




~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


RE: What is wrong with this function (A thread of my very own)

2006-12-14 Thread Bobby Hartsfield
First of all, start your own thread :-) especially when your question has
nothing what so ever to do with the topic of the one you posted to. ;-)

Second, all I can really tell you is to look into SQL updates, inserts and
deletes. Google.

..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 

 


-Original Message-
From: arthur amanyire [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 4:16 AM
To: CF-Talk
Subject: Re: What is wrong with this function

i am developing a real estate app and i have 3 submits(insert,update 
and delete ) on one cf flash form can some one give me code to manipulate 
the data base with these submits without using flash remoting




~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


Re: What is wrong with this function

2006-12-13 Thread Robertson-Ravo, Neil (RX)
VAR your variables etc! ! :-)








This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions. 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Bruce Sorge
To: CF-Talk
Sent: Thu Dec 14 00:15:27 2006
Subject: What is wrong with this function

I have a CFC that holds the bulk of my queries. Everything was working great
until I added another function. Now when I open my CFC in the browser to
check everything out, I get the message Cant Load a Null.
The examples below are a function that works and then the new function.
Also, on the function that is not working, if I remove the arguements the
CFC loads fine. I cannot see anything wrong with this function.

Function that works properly
!--- We need to get a list of the number of Council Districts there are and
use this to match up ---
 cffunction name=listCouncilDistricts access=public returntype=query
hint=Get a list of the council districts
  cfargument name=NCID type=string required=yes hint=ID is required
default=#ID#
  cfquery name=qListDistricts datasource=#Application.dsource#
   SELECT *
   FROM tblCouncilDistrict
   WHERE NC_ID = #ID#
  /cfquery

  cfreturn qListDistricts
 /cffunction

Function that is not working. Removing the Arguments though allows it to
load.
  !--- Login function for the application ---
  cffunction name=getLogin access=public returntype=query hint=Get
the user's login information from the database
   cfargument name=username type=string required=yes hint=Username
is required default=#username#
   cfargument name=password type=string required=yes hint=Password
is required default=#password#
   cfquery name=qlogin datasource=#Application.dsource#
SELECT Acct_ID, USERNAME,PASSWORD
FROM ACCOUNTINFO
WHERE USERNAME=#username# AND PASSWORD=#password#
   /cfquery

   cfreturn qlogin
  /cffunction




~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


Re: What is wrong with this function

2006-12-13 Thread Charlie Griefer
in what scope do #username# and #password# (the defaults for the
required arguments) exist?

On 12/13/06, Bruce Sorge [EMAIL PROTECTED] wrote:
 I have a CFC that holds the bulk of my queries. Everything was working great
 until I added another function. Now when I open my CFC in the browser to
 check everything out, I get the message Cant Load a Null.
 The examples below are a function that works and then the new function.
 Also, on the function that is not working, if I remove the arguements the
 CFC loads fine. I cannot see anything wrong with this function.

 Function that works properly
 !--- We need to get a list of the number of Council Districts there are and
 use this to match up ---
  cffunction name=listCouncilDistricts access=public returntype=query
 hint=Get a list of the council districts
   cfargument name=NCID type=string required=yes hint=ID is required
 default=#ID#
   cfquery name=qListDistricts datasource=#Application.dsource#
SELECT *
FROM tblCouncilDistrict
WHERE NC_ID = #ID#
   /cfquery

   cfreturn qListDistricts
  /cffunction

 Function that is not working. Removing the Arguments though allows it to
 load.
   !--- Login function for the application ---
   cffunction name=getLogin access=public returntype=query hint=Get
 the user's login information from the database
cfargument name=username type=string required=yes hint=Username
 is required default=#username#
cfargument name=password type=string required=yes hint=Password
 is required default=#password#
cfquery name=qlogin datasource=#Application.dsource#
 SELECT Acct_ID, USERNAME,PASSWORD
 FROM ACCOUNTINFO
 WHERE USERNAME=#username# AND PASSWORD=#password#
/cfquery

cfreturn qlogin
   /cffunction


 

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


Re: What is wrong with this function

2006-12-13 Thread Doug Brown
What happens if you simply lose the deafult attribute of the cfargument?
You should be setting that on your cfinvoke anyhow, should you not?


cfinvoke
component=this.that.thisAgain
method=myMethod
username=#username#
password=#password#


~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


RE: What is wrong with this function

2006-12-13 Thread Bruce Sorge
Well first of all, there are a couple of functions that take either form or
URL variables. I suppose I can put some code in there that looks for either
and then create a this.foo var. But I am more concerned as to why this one
function is not working when two other functions that take arguments are not
VAR'd and are working fine?

-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 4:20 PM
To: CF-Talk
Subject: Re: What is wrong with this function

VAR your variables etc! ! :-)








This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions. 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Bruce Sorge
To: CF-Talk
Sent: Thu Dec 14 00:15:27 2006
Subject: What is wrong with this function

I have a CFC that holds the bulk of my queries. Everything was working great
until I added another function. Now when I open my CFC in the browser to
check everything out, I get the message Cant Load a Null.
The examples below are a function that works and then the new function.
Also, on the function that is not working, if I remove the arguements the
CFC loads fine. I cannot see anything wrong with this function.

Function that works properly
!--- We need to get a list of the number of Council Districts there are and
use this to match up ---
 cffunction name=listCouncilDistricts access=public returntype=query
hint=Get a list of the council districts
  cfargument name=NCID type=string required=yes hint=ID is required
default=#ID#
  cfquery name=qListDistricts datasource=#Application.dsource#
   SELECT *
   FROM tblCouncilDistrict
   WHERE NC_ID = #ID#
  /cfquery

  cfreturn qListDistricts
 /cffunction

Function that is not working. Removing the Arguments though allows it to
load.
  !--- Login function for the application ---
  cffunction name=getLogin access=public returntype=query hint=Get
the user's login information from the database
   cfargument name=username type=string required=yes hint=Username
is required default=#username#
   cfargument name=password type=string required=yes hint=Password
is required default=#password#
   cfquery name=qlogin datasource=#Application.dsource#
SELECT Acct_ID, USERNAME,PASSWORD
FROM ACCOUNTINFO
WHERE USERNAME=#username# AND PASSWORD=#password#
   /cfquery

   cfreturn qlogin
  /cffunction






~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


RE: What is wrong with this function

2006-12-13 Thread Bruce Sorge
They are form variables from the login form.

-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 4:27 PM
To: CF-Talk
Subject: Re: What is wrong with this function

in what scope do #username# and #password# (the defaults for the
required arguments) exist?

On 12/13/06, Bruce Sorge [EMAIL PROTECTED] wrote:
 I have a CFC that holds the bulk of my queries. Everything was working
great
 until I added another function. Now when I open my CFC in the browser to
 check everything out, I get the message Cant Load a Null.
 The examples below are a function that works and then the new function.
 Also, on the function that is not working, if I remove the arguements the
 CFC loads fine. I cannot see anything wrong with this function.

 Function that works properly
 !--- We need to get a list of the number of Council Districts there are
and
 use this to match up ---
  cffunction name=listCouncilDistricts access=public
returntype=query
 hint=Get a list of the council districts
   cfargument name=NCID type=string required=yes hint=ID is
required
 default=#ID#
   cfquery name=qListDistricts datasource=#Application.dsource#
SELECT *
FROM tblCouncilDistrict
WHERE NC_ID = #ID#
   /cfquery

   cfreturn qListDistricts
  /cffunction

 Function that is not working. Removing the Arguments though allows it to
 load.
   !--- Login function for the application ---
   cffunction name=getLogin access=public returntype=query hint=Get
 the user's login information from the database
cfargument name=username type=string required=yes hint=Username
 is required default=#username#
cfargument name=password type=string required=yes hint=Password
 is required default=#password#
cfquery name=qlogin datasource=#Application.dsource#
 SELECT Acct_ID, USERNAME,PASSWORD
 FROM ACCOUNTINFO
 WHERE USERNAME=#username# AND PASSWORD=#password#
/cfquery

cfreturn qlogin
   /cffunction


 



~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


Re: What is wrong with this function

2006-12-13 Thread Charlie Griefer
i don't believe the form scope is available to the CFC.  Does the form
submit directly to the CFC or to a page that calls the CFC?

Ideally, you're not supposed to reference outside scopes from within
the CFC.  If you need an outside variable, pass it in as an argument
(same holds true for your #application.datasource#...should be passing
that value in from the outside).

try removing those default values (they're not really needed since the
arguments are required anyway...if the argument is passed, there will
be a value...if the argument is not passed, you'll throw an error).

comment out the WHERE in the query in question and likely no more
errors will be thrown.  Then it's just a matter of properly passing in
the username and password values as arguments and referencing them as
arguments.username and arguments.password in the cfquery.



On 12/13/06, Bruce Sorge [EMAIL PROTECTED] wrote:
 They are form variables from the login form.

 -Original Message-
 From: Charlie Griefer [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 4:27 PM
 To: CF-Talk
 Subject: Re: What is wrong with this function

 in what scope do #username# and #password# (the defaults for the
 required arguments) exist?

 On 12/13/06, Bruce Sorge [EMAIL PROTECTED] wrote:
  I have a CFC that holds the bulk of my queries. Everything was working
 great
  until I added another function. Now when I open my CFC in the browser to
  check everything out, I get the message Cant Load a Null.
  The examples below are a function that works and then the new function.
  Also, on the function that is not working, if I remove the arguements the
  CFC loads fine. I cannot see anything wrong with this function.
 
  Function that works properly
  !--- We need to get a list of the number of Council Districts there are
 and
  use this to match up ---
   cffunction name=listCouncilDistricts access=public
 returntype=query
  hint=Get a list of the council districts
cfargument name=NCID type=string required=yes hint=ID is
 required
  default=#ID#
cfquery name=qListDistricts datasource=#Application.dsource#
 SELECT *
 FROM tblCouncilDistrict
 WHERE NC_ID = #ID#
/cfquery
 
cfreturn qListDistricts
   /cffunction
 
  Function that is not working. Removing the Arguments though allows it to
  load.
!--- Login function for the application ---
cffunction name=getLogin access=public returntype=query hint=Get
  the user's login information from the database
 cfargument name=username type=string required=yes hint=Username
  is required default=#username#
 cfargument name=password type=string required=yes hint=Password
  is required default=#password#
 cfquery name=qlogin datasource=#Application.dsource#
  SELECT Acct_ID, USERNAME,PASSWORD
  FROM ACCOUNTINFO
  WHERE USERNAME=#username# AND PASSWORD=#password#
 /cfquery
 
 cfreturn qlogin
/cffunction
 
 
 



 

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


RE: What is wrong with this function

2006-12-13 Thread Bobby Hartsfield
You say the first one works fine but I don’t see where #ID# comes from. And
if it does exist (somehow) then what is the point of this cfargument when
it's not used in the query?

cfargument name=NCID type=string required=yes hint=ID is required
default=#ID#


In the second one that you claim doesn’t work #username# and #password#
should proabbyl be 

#arguments.username# and arguments.password#

They should also have  single quotes im sure but better yet, cfqueryparams

And th final problem... usernmae and password are possible attributes of the
cfinvoke tag itsself but you want them passed as arguments to your method. I
don’t think that is going to work :-)

Try... uname and pword or somethingelse.

And to be picky... why select 2 values (username and password) in the query
when you already have them? ;-)


..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 

 

-Original Message-
From: Bruce Sorge [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 7:15 PM
To: CF-Talk
Subject: What is wrong with this function

I have a CFC that holds the bulk of my queries. Everything was working great
until I added another function. Now when I open my CFC in the browser to
check everything out, I get the message Cant Load a Null.
The examples below are a function that works and then the new function.
Also, on the function that is not working, if I remove the arguements the
CFC loads fine. I cannot see anything wrong with this function.

Function that works properly
!--- We need to get a list of the number of Council Districts there are and
use this to match up ---
 cffunction name=listCouncilDistricts access=public returntype=query
hint=Get a list of the council districts
  cfargument name=NCID type=string required=yes hint=ID is required
default=#ID#
  cfquery name=qListDistricts datasource=#Application.dsource#
   SELECT *
   FROM tblCouncilDistrict
   WHERE NC_ID = #ID#
  /cfquery

  cfreturn qListDistricts
 /cffunction

Function that is not working. Removing the Arguments though allows it to
load.
  !--- Login function for the application ---
  cffunction name=getLogin access=public returntype=query hint=Get
the user's login information from the database
   cfargument name=username type=string required=yes hint=Username
is required default=#username#
   cfargument name=password type=string required=yes hint=Password
is required default=#password#
   cfquery name=qlogin datasource=#Application.dsource#
SELECT Acct_ID, USERNAME,PASSWORD
FROM ACCOUNTINFO
WHERE USERNAME=#username# AND PASSWORD=#password#
   /cfquery

   cfreturn qlogin
  /cffunction




~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


RE: What is wrong with this function

2006-12-13 Thread Bruce Sorge
Charlie and Bobby,
Thank you for your insight. I am still new to CFC's. The ones I included
here are just two of several functions that I have for this app. I will
implement these ideas in the morning when I get to work.

Bruce

-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 13, 2006 8:09 PM
To: CF-Talk
Subject: Re: What is wrong with this function

i don't believe the form scope is available to the CFC.  Does the form
submit directly to the CFC or to a page that calls the CFC?

Ideally, you're not supposed to reference outside scopes from within
the CFC.  If you need an outside variable, pass it in as an argument
(same holds true for your #application.datasource#...should be passing
that value in from the outside).

try removing those default values (they're not really needed since the
arguments are required anyway...if the argument is passed, there will
be a value...if the argument is not passed, you'll throw an error).

comment out the WHERE in the query in question and likely no more
errors will be thrown.  Then it's just a matter of properly passing in
the username and password values as arguments and referencing them as
arguments.username and arguments.password in the cfquery.



On 12/13/06, Bruce Sorge [EMAIL PROTECTED] wrote:
 They are form variables from the login form.

 -Original Message-
 From: Charlie Griefer [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 13, 2006 4:27 PM
 To: CF-Talk
 Subject: Re: What is wrong with this function

 in what scope do #username# and #password# (the defaults for the
 required arguments) exist?

 On 12/13/06, Bruce Sorge [EMAIL PROTECTED] wrote:
  I have a CFC that holds the bulk of my queries. Everything was working
 great
  until I added another function. Now when I open my CFC in the browser to
  check everything out, I get the message Cant Load a Null.
  The examples below are a function that works and then the new function.
  Also, on the function that is not working, if I remove the arguements
the
  CFC loads fine. I cannot see anything wrong with this function.
 
  Function that works properly
  !--- We need to get a list of the number of Council Districts there are
 and
  use this to match up ---
   cffunction name=listCouncilDistricts access=public
 returntype=query
  hint=Get a list of the council districts
cfargument name=NCID type=string required=yes hint=ID is
 required
  default=#ID#
cfquery name=qListDistricts datasource=#Application.dsource#
 SELECT *
 FROM tblCouncilDistrict
 WHERE NC_ID = #ID#
/cfquery
 
cfreturn qListDistricts
   /cffunction
 
  Function that is not working. Removing the Arguments though allows it to
  load.
!--- Login function for the application ---
cffunction name=getLogin access=public returntype=query
hint=Get
  the user's login information from the database
 cfargument name=username type=string required=yes
hint=Username
  is required default=#username#
 cfargument name=password type=string required=yes
hint=Password
  is required default=#password#
 cfquery name=qlogin datasource=#Application.dsource#
  SELECT Acct_ID, USERNAME,PASSWORD
  FROM ACCOUNTINFO
  WHERE USERNAME=#username# AND PASSWORD=#password#
 /cfquery
 
 cfreturn qlogin
/cffunction
 
 
 



 



~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

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


Re: What is wrong with this query?

2006-11-21 Thread Charles Sheehan-MIles
I think so.  When you do the order by, should it be something like this
(assuming you are ordering by the ...adversements.city column)?

ORDER BY #APPLICATION.DBPRE#Advertisements.#ARGUMENTS.SORTYBY#
#ARGUMENTS.SORTDIRECTION#

O


On 11/21/06 9:37 PM, Doug Brown [EMAIL PROTECTED] wrote:

 I have a sort function on a search results page that is giving me an Ambiguous
 column name error, and for the life of me I do not know why. I can sort by
 price, SKUName and photo just fine but cannot sort by city or state. I have a
 city and state column in the table I am joining with, but cannot see that
 would be the problem. Am I wrong?
 
 Query
 
  SELECT   #APPLICATION.DBPRE#MemberProfile.RscreenName,
 #APPLICATION.DBPRE#Advertisements.AdID,
 #APPLICATION.DBPRE#Advertisements.MemberID,
 #APPLICATION.DBPRE#Advertisements.CategoryID,
 #APPLICATION.DBPRE#Advertisements.SCategoryID,
 #APPLICATION.DBPRE#Advertisements.ItemPhoto,
 #APPLICATION.DBPRE#Advertisements.SKUName,
 #APPLICATION.DBPRE#Advertisements.Price,
 #APPLICATION.DBPRE#Advertisements.AQuantity,
 #APPLICATION.DBPRE#Advertisements.State,
 #APPLICATION.DBPRE#Advertisements.County,
  #APPLICATION.DBPRE#Advertisements.City
  FROM  #APPLICATION.DBPRE#Advertisements
  INNER JOIN  #APPLICATION.DBPRE#MemberProfile
  ON   #APPLICATION.DBPRE#Advertisements.MemberID =
 #APPLICATION.DBPRE#MemberProfile.MemberID
  WHERE   #APPLICATION.DBPRE#Advertisements.Status = cfqueryparam
 cfsqltype=CF_SQL_BIT value=#Val(ARGUMENTS.Status)#
 
 
 offending code
 
 cfif Len(ARGUMENTS.search_visitor_city) gt 0
 AND #APPLICATION.DBPRE#Advertisements.State = cfqueryparam
 cfsqltype=CF_SQL_CHAR value='#Trim(ARGUMENTS.search_state)#'
 AND #APPLICATION.DBPRE#Advertisements.City = cfqueryparam
 cfsqltype=CF_SQL_VARCHAR value='#Trim(ARGUMENTS.search_visitor_city)#'
 /cfif
 
  ORDER BY #ARGUMENTS.sortBy#
#ARGUMENTS.sortDirection#
 
 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: What is wrong with this query?

2006-11-21 Thread Jim Wright
Doug Brown wrote:
 I have a sort function on a search results page that is giving me an
 Ambiguous column name error, and for the life of me I do not know
 why. I can sort by price, SKUName and photo just fine but cannot sort
 by city or state. I have a city and state column in the table I am
 joining with, but cannot see that would be the problem. Am I wrong?
 
snip
 
 ORDER BY #ARGUMENTS.sortBy# #ARGUMENTS.sortDirection#
 

If the city and state are in more than one table, then whatever is in 
that ARGUMENTS.sortby would need to be scoped with the table name.  I'm 
guessing that ARGUMENTS.sortby = state, city and it needs to be 
something like...
ARGUMENTS.sortby = #APPLICATION.DBPRE#Advertisements.State, 
  #APPLICATION.DBPRE#Advertisements.City


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: What is wrong with this query?

2006-11-21 Thread Doug Brown
Tried that, now I get a different error.

Element SORTBY is undefined in arguments. It has been defined.

cfargument name=sortBy type=string required=yes


Doug




- Original Message - 
From: Charles Sheehan-MIles [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, November 21, 2006 7:45 PM
Subject: Re: What is wrong with this query?


 I think so.  When you do the order by, should it be something like this
 (assuming you are ordering by the ...adversements.city column)?

 ORDER BY #APPLICATION.DBPRE#Advertisements.#ARGUMENTS.SORTYBY#
 #ARGUMENTS.SORTDIRECTION#

 O


 On 11/21/06 9:37 PM, Doug Brown [EMAIL PROTECTED] wrote:

  I have a sort function on a search results page that is giving me an
Ambiguous
  column name error, and for the life of me I do not know why. I can sort
by
  price, SKUName and photo just fine but cannot sort by city or state. I
have a
  city and state column in the table I am joining with, but cannot see
that
  would be the problem. Am I wrong?
 
  Query
 
   SELECT   #APPLICATION.DBPRE#MemberProfile.RscreenName,
  #APPLICATION.DBPRE#Advertisements.AdID,
  #APPLICATION.DBPRE#Advertisements.MemberID,
  #APPLICATION.DBPRE#Advertisements.CategoryID,
  #APPLICATION.DBPRE#Advertisements.SCategoryID,
  #APPLICATION.DBPRE#Advertisements.ItemPhoto,
  #APPLICATION.DBPRE#Advertisements.SKUName,
  #APPLICATION.DBPRE#Advertisements.Price,
  #APPLICATION.DBPRE#Advertisements.AQuantity,
  #APPLICATION.DBPRE#Advertisements.State,
  #APPLICATION.DBPRE#Advertisements.County,
   #APPLICATION.DBPRE#Advertisements.City
   FROM  #APPLICATION.DBPRE#Advertisements
   INNER JOIN  #APPLICATION.DBPRE#MemberProfile
   ON   #APPLICATION.DBPRE#Advertisements.MemberID =
  #APPLICATION.DBPRE#MemberProfile.MemberID
   WHERE   #APPLICATION.DBPRE#Advertisements.Status = cfqueryparam
  cfsqltype=CF_SQL_BIT value=#Val(ARGUMENTS.Status)#
 
 
  offending code
 
  cfif Len(ARGUMENTS.search_visitor_city) gt 0
  AND #APPLICATION.DBPRE#Advertisements.State = cfqueryparam
  cfsqltype=CF_SQL_CHAR value='#Trim(ARGUMENTS.search_state)#'
  AND #APPLICATION.DBPRE#Advertisements.City = cfqueryparam
  cfsqltype=CF_SQL_VARCHAR
value='#Trim(ARGUMENTS.search_visitor_city)#'
  /cfif
 
   ORDER BY #ARGUMENTS.sortBy#
 #ARGUMENTS.sortDirection#
 
 

 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: What is wrong with this query?

2006-11-21 Thread Doug Brown
That worked. Dont know what the hell I am doing sometimes.



Doug B.



- Original Message - 
From: Charles Sheehan-MIles [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, November 21, 2006 7:45 PM
Subject: Re: What is wrong with this query?


 I think so.  When you do the order by, should it be something like this
 (assuming you are ordering by the ...adversements.city column)?

 ORDER BY #APPLICATION.DBPRE#Advertisements.#ARGUMENTS.SORTYBY#
 #ARGUMENTS.SORTDIRECTION#

 O


 On 11/21/06 9:37 PM, Doug Brown [EMAIL PROTECTED] wrote:

  I have a sort function on a search results page that is giving me an
Ambiguous
  column name error, and for the life of me I do not know why. I can sort
by
  price, SKUName and photo just fine but cannot sort by city or state. I
have a
  city and state column in the table I am joining with, but cannot see
that
  would be the problem. Am I wrong?
 
  Query
 
   SELECT   #APPLICATION.DBPRE#MemberProfile.RscreenName,
  #APPLICATION.DBPRE#Advertisements.AdID,
  #APPLICATION.DBPRE#Advertisements.MemberID,
  #APPLICATION.DBPRE#Advertisements.CategoryID,
  #APPLICATION.DBPRE#Advertisements.SCategoryID,
  #APPLICATION.DBPRE#Advertisements.ItemPhoto,
  #APPLICATION.DBPRE#Advertisements.SKUName,
  #APPLICATION.DBPRE#Advertisements.Price,
  #APPLICATION.DBPRE#Advertisements.AQuantity,
  #APPLICATION.DBPRE#Advertisements.State,
  #APPLICATION.DBPRE#Advertisements.County,
   #APPLICATION.DBPRE#Advertisements.City
   FROM  #APPLICATION.DBPRE#Advertisements
   INNER JOIN  #APPLICATION.DBPRE#MemberProfile
   ON   #APPLICATION.DBPRE#Advertisements.MemberID =
  #APPLICATION.DBPRE#MemberProfile.MemberID
   WHERE   #APPLICATION.DBPRE#Advertisements.Status = cfqueryparam
  cfsqltype=CF_SQL_BIT value=#Val(ARGUMENTS.Status)#
 
 
  offending code
 
  cfif Len(ARGUMENTS.search_visitor_city) gt 0
  AND #APPLICATION.DBPRE#Advertisements.State = cfqueryparam
  cfsqltype=CF_SQL_CHAR value='#Trim(ARGUMENTS.search_state)#'
  AND #APPLICATION.DBPRE#Advertisements.City = cfqueryparam
  cfsqltype=CF_SQL_VARCHAR
value='#Trim(ARGUMENTS.search_visitor_city)#'
  /cfif
 
   ORDER BY #ARGUMENTS.sortBy#
 #ARGUMENTS.sortDirection#
 
 

 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Re: What is wrong w/ this cfscript block of code?

2003-11-14 Thread Stephen Moretti
Che,

I think you probably need a SetVariable for this...

 RandValue#i# = RandRange(1, ListLen(PIDList));
 
SetVariable(RandValuei,RandRange(1, ListLen(PIDList));

 RandRecord#i# = ListGetAt(PIDList, RandValue#i#);
 
SetVariable(RandRecordi,RandRange(1, ListLen(PIDList));

And perhaps use a struct reference for this

 PIDList = ListDeleteAt(PIDList, RandValue#i#);
 
PIDList = ListDeleteAt(PIDList,variables[RandValuei]);

Hope this helps

Regards

Stephen

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: What is wrong w/ this cfscript block of code?

2003-11-14 Thread Ubqtous
Che,

On 11/14/2003 at 11:33, you wrote:

CV In the end, I would like 4 dynamically named variables with random
CV values. What am I missing?

CV RandValue#i# = RandRange(1, ListLen(PIDList));

Quote the dynamically named variable:

RandValue#i# = RandRange(1, ListLen(PIDList));

~ Ubqtous ~

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: What is wrong w/ this cfscript block of code?

2003-11-14 Thread Che Vilnonis
Stephen, the last line bombs out. Variables is undefined. Any ideas?
-Original Message-
From: Stephen Moretti [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 11:42 AM
To: CF-Talk
Subject: Re: What is wrong w/ this cfscript block of code?

Che,

I think you probably need a SetVariable for this...

 RandValue#i# = RandRange(1, ListLen(PIDList));

SetVariable(RandValuei,RandRange(1, ListLen(PIDList));

 RandRecord#i# = ListGetAt(PIDList, RandValue#i#);

SetVariable(RandRecordi,RandRange(1, ListLen(PIDList));

And perhaps use a struct reference for this

 PIDList = ListDeleteAt(PIDList, RandValue#i#);

PIDList = ListDeleteAt(PIDList,variables[RandValuei]);

Hope this helps

Regards

Stephen


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: What is wrong w/ this cfscript block of code?

2003-11-14 Thread Ubqtous
Che,

On 11/14/2003 at 12:03, you wrote:

CV Stephen, the last line bombs out. Variables is undefined. Any
CV ideas?

CVPIDList = ListDeleteAt(PIDList,variables[RandValuei]);

How about this:

cfscript
PIDList=ValueList(getAllInCat.Product_ID);
for(i=1; i lte 4; i=i+1){
 thisRandValue=RandRange(1,ListLen(PIDList));
 RandValue#i#=thisRandValue;
 RandRecord#i#=ListGetAt(PIDList,thisRandValue);
 PIDList=ListDeleteAt(PIDList,thisRandValue);
}
/cfscript

~ Ubqtous ~

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: What is wrong w/ this cfscript block of code?

2003-11-14 Thread Che Vilnonis
that did the trick. thank you very much.
clever, using a set variable name made it work.
-Original Message-
From: Ubqtous [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 12:22 PM
To: CF-Talk
Subject: Re: What is wrong w/ this cfscript block of code?

Che,

On 11/14/2003 at 12:03, you wrote:

CV Stephen, the last line bombs out. Variables is undefined. Any
CV ideas?

CVPIDList = ListDeleteAt(PIDList,variables[RandValuei]);

How about this:

cfscript
 PIDList=ValueList(getAllInCat.Product_ID);
 for(i=1; i lte 4; i=i+1){
thisRandValue=RandRange(1,ListLen(PIDList));
RandValue#i#=thisRandValue;
RandRecord#i#=ListGetAt(PIDList,thisRandValue);
PIDList=ListDeleteAt(PIDList,thisRandValue);
 }
/cfscript

~ Ubqtous ~


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: What is wrong w/ this cfscript block of code?

2003-11-14 Thread Ubqtous
Che,

On 11/14/2003 at 12:28, you wrote:

CV clever, using a set variable name made it work.

I thought the variables[RandValuei] trick would have worked, but
maybe your version of CF doesn't support it.

I've successfully used that approach with the request scope on CF5:

request.name_#f#=trim(form['name_'f]);
...
#request['name_'f]#

~ Ubqtous ~

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: What is wrong with this Insert Query?

2002-12-16 Thread Mark A. Kruger - CFG
Rick,

Create a string that is correctly formatted as a date (i.e.
dateformat(form.date,'mm-dd-') or whatever), then try passing it in as a
char( ) data type.  That usually works on other platforms.

-Mark

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 PM
To: CF-Talk
Subject: What is wrong with this Insert Query?


Hi, all.

mySQL 4.0.1, Win2K Pro

I'm running this Insert Query:

The #Form.PaymentDate# coming from the form shows up as
{d '2002-12-16'} (before processing below):

CFQUERY Name=InsertPayment Datasource=#DSN#
 Insert into rentcofeepayments
 (RentalCompanyID, PaymentDate, PaymentMethod,
PaymentAmount)
  Values (cfqueryparam cfsqltype=CF_SQL_BIGINT
Value=#Form.RentalCompanyID#,
  cfqueryparam cfsqltype=CF_SQL_DATE
Value=#CreateODBCDate(Form.PaymentDate)#,
  cfqueryparam cfsqltype=CF_SQL_VARCHAR
Value=#Form.PaymentMethod#,
  cfqueryparam cfsqltype=CF_SQL_DOUBLE
Value=#Form.PaymentAmount#)
/CFQUERY

But getting this error:

CFQUERYPARAM data conversion error

There is a data conversion error for CFQUERYPARAM #2.

How do I modify it to make it work?
I added the CreateODBCDate into the code, but that didn't help...

Thanks,

Rick



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: What is wrong with this Insert Query?

2002-12-16 Thread Rick Faircloth
Hi, Mark...

Changed the problem line from:

cfqueryparam cfsqltype=CF_SQL_DATE Value=#Form.PaymentDate#

to:

cfqueryparam cfsqltype=CF_SQL_DATE Value=#DateFormat(Form.PaymentDate,
'M/D/')#

And it worked fine.

Thanks for the help...

Rick


-Original Message-
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 11:31 PM
To: CF-Talk
Subject: RE: What is wrong with this Insert Query?


Rick,

Create a string that is correctly formatted as a date (i.e.
dateformat(form.date,'mm-dd-') or whatever), then try passing it in as a
char( ) data type.  That usually works on other platforms.

-Mark

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 PM
To: CF-Talk
Subject: What is wrong with this Insert Query?


Hi, all.

mySQL 4.0.1, Win2K Pro

I'm running this Insert Query:

The #Form.PaymentDate# coming from the form shows up as
{d '2002-12-16'} (before processing below):

CFQUERY Name=InsertPayment Datasource=#DSN#
 Insert into rentcofeepayments
 (RentalCompanyID, PaymentDate, PaymentMethod,
PaymentAmount)
  Values (cfqueryparam cfsqltype=CF_SQL_BIGINT
Value=#Form.RentalCompanyID#,
  cfqueryparam cfsqltype=CF_SQL_DATE
Value=#CreateODBCDate(Form.PaymentDate)#,
  cfqueryparam cfsqltype=CF_SQL_VARCHAR
Value=#Form.PaymentMethod#,
  cfqueryparam cfsqltype=CF_SQL_DOUBLE
Value=#Form.PaymentAmount#)
/CFQUERY

But getting this error:

CFQUERYPARAM data conversion error

There is a data conversion error for CFQUERYPARAM #2.

How do I modify it to make it work?
I added the CreateODBCDate into the code, but that didn't help...

Thanks,

Rick




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: What is wrong with this Insert Query?

2002-12-16 Thread Mark A. Kruger - CFG
Great.

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:39 PM
To: CF-Talk
Subject: RE: What is wrong with this Insert Query?


Hi, Mark...

Changed the problem line from:

cfqueryparam cfsqltype=CF_SQL_DATE Value=#Form.PaymentDate#

to:

cfqueryparam cfsqltype=CF_SQL_DATE Value=#DateFormat(Form.PaymentDate,
'M/D/')#

And it worked fine.

Thanks for the help...

Rick


-Original Message-
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 11:31 PM
To: CF-Talk
Subject: RE: What is wrong with this Insert Query?


Rick,

Create a string that is correctly formatted as a date (i.e.
dateformat(form.date,'mm-dd-') or whatever), then try passing it in as a
char( ) data type.  That usually works on other platforms.

-Mark

-Original Message-
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:01 PM
To: CF-Talk
Subject: What is wrong with this Insert Query?


Hi, all.

mySQL 4.0.1, Win2K Pro

I'm running this Insert Query:

The #Form.PaymentDate# coming from the form shows up as
{d '2002-12-16'} (before processing below):

CFQUERY Name=InsertPayment Datasource=#DSN#
 Insert into rentcofeepayments
 (RentalCompanyID, PaymentDate, PaymentMethod,
PaymentAmount)
  Values (cfqueryparam cfsqltype=CF_SQL_BIGINT
Value=#Form.RentalCompanyID#,
  cfqueryparam cfsqltype=CF_SQL_DATE
Value=#CreateODBCDate(Form.PaymentDate)#,
  cfqueryparam cfsqltype=CF_SQL_VARCHAR
Value=#Form.PaymentMethod#,
  cfqueryparam cfsqltype=CF_SQL_DOUBLE
Value=#Form.PaymentAmount#)
/CFQUERY

But getting this error:

CFQUERYPARAM data conversion error

There is a data conversion error for CFQUERYPARAM #2.

How do I modify it to make it work?
I added the CreateODBCDate into the code, but that didn't help...

Thanks,

Rick





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: What is wrong with this code?

2002-03-22 Thread Jon Hall

argh neither of those work, please ignore, unless you can tell me what I am
doing wrong :). Sorry for the spam.
- Original Message -
From: Jon Hall [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, March 22, 2002 8:49 PM
Subject: What is wrong with this code?


 There is something wrong with this code (other than it's overly
complex...),
 but I can't see it. Every time I run this code I get an anit.exe process
 that goes to 99%, but, and here is the weird part, the CF template does
stop
 processing and I get all of the debug except for the queries...weird. What
 did I do wrong? I think it has something to do with me misunderstanding
how
 cfexit works (this is not a custom tag).

 getVCount.recordCount = 2
 getVariants.recordCount = 6



__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: What is wrong with this CFIF Date Calculation?

2001-11-21 Thread Douglas L. Brown

You are missing a # in your dateFormat



DB



- Original Message -
From: Brunt, Michael [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, November 21, 2001 4:24 PM
Subject: What is wrong with this CFIF Date Calculation?


 I am trying to validate a date change point and am getting an objection
from
 CF in using LT can ayone see what I am doing wrong here?

 cfif #DateFormat(Session.GFDate,mm-dd-) LT 7/1/1995

 Mike Brunt
 Sempra Energy
 213.244.5226

 Prediction is hard, especially when it's about the future.


 
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: What is wrong with this CFIF Date Calculation?

2001-11-21 Thread Joseph DeVore

Why don't you use the datecompare() function?

datecompare() performs a full date/time comparison of two dates.

It returns:
-1 if date1 is less than date2
0 if date1 is equal to date2
1 if date1 is greater than date2


You can set the optional datepart parameter as well.

cfif datecompare(dateformat(Session.GFDate,mm-dd-),'7/1/1995'))
eq -1
less than
cfelseif datecompare(dateformat(Session.GFDate,mm-dd-),'7/1/1995'))
eq 1
greater than
cfelse
is equal
/cfif


Joseph DeVore
VeloxWeb Technologies


-Original Message-
From: Douglas L. Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 4:43 PM
To: CF-Talk
Subject: Re: What is wrong with this CFIF Date Calculation?


You are missing a # in your dateFormat



DB



- Original Message -
From: Brunt, Michael [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, November 21, 2001 4:24 PM
Subject: What is wrong with this CFIF Date Calculation?


 I am trying to validate a date change point and am getting an objection
from
 CF in using LT can ayone see what I am doing wrong here?

 cfif #DateFormat(Session.GFDate,mm-dd-) LT 7/1/1995

 Mike Brunt
 Sempra Energy
 213.244.5226

 Prediction is hard, especially when it's about the future.




~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: What is wrong with this CFIF Date Calculation?

2001-11-21 Thread Brunt, Michael

Joseph, thank you very much works perfectly have a Happy Thanksgiving.

Mike Brunt
Sempra Energy
213.244.5226

Prediction is hard, especially when it's about the future. 


-Original Message-
From: Joseph DeVore [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 5:15 PM
To: CF-Talk
Subject: RE: What is wrong with this CFIF Date Calculation?


Why don't you use the datecompare() function?

datecompare() performs a full date/time comparison of two dates.

It returns:
-1 if date1 is less than date2
0 if date1 is equal to date2
1 if date1 is greater than date2


You can set the optional datepart parameter as well.

cfif datecompare(dateformat(Session.GFDate,mm-dd-),'7/1/1995'))
eq -1
less than
cfelseif datecompare(dateformat(Session.GFDate,mm-dd-),'7/1/1995'))
eq 1
greater than
cfelse
is equal
/cfif


Joseph DeVore
VeloxWeb Technologies


-Original Message-
From: Douglas L. Brown [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 4:43 PM
To: CF-Talk
Subject: Re: What is wrong with this CFIF Date Calculation?


You are missing a # in your dateFormat



DB



- Original Message -
From: Brunt, Michael [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, November 21, 2001 4:24 PM
Subject: What is wrong with this CFIF Date Calculation?


 I am trying to validate a date change point and am getting an objection
from
 CF in using LT can ayone see what I am doing wrong here?

 cfif #DateFormat(Session.GFDate,mm-dd-) LT 7/1/1995

 Mike Brunt
 Sempra Energy
 213.244.5226

 Prediction is hard, especially when it's about the future.





~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: What is wrong with the create table statement for Jet SQL ?

2000-11-10 Thread Jaime Garza

I know little jet, but it looks like other SQLs... Are you missing a comma
right after counter?



 -Original Message-
 From: CF-Talk [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 10, 2000 3:48 PM
 To: CF-Talk
 Subject: What is wrong with the create table statement for Jet SQL ?


 What the hell is wrong with this create table statement (Jet SQL  for
 MS-Access).
 I want to build it via CF.

 cfquery name="qry_delete"
 datasource="Mail_Q"
 dbtype="ODBC"
 CREATE TABLE EventLog
   (
  ID COUNTER
   CONSTRAINT ID PRIMARY KEY,
   Domain TEXT 128,
   IP TEXT 40,
   Action TEXT 10,
   xDate DATE 8,
   Info TEXT 255
   )
 /cfquery

 I get a syntax error:

 Error Diagnostic Information

  ODBC Error Code = 37000 (Syntax error or access violation)

  [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in CREATE
 TABLE-Anweisung.

 Thank you.
 Uwe

 SD Solutions
 Lange Zeile 27
 85435 Erding
 Fon: 08122/903791
 Fax: 08122/903792
 Mail: [EMAIL PROTECTED]
 Web: www.sdsolutions.de



 --
 --
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
 or send a message with 'unsubscribe' in the body to
 [EMAIL PROTECTED]


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: What is wrong with the create table statement for Jet SQL ?

2000-11-10 Thread Joseph Thompson

umm.  did you try putting the size of the feilds in "()"
eg; text (128)?  and I don't think you need to size the DATE type feild.

CREATE TABLE EventLog
  (
 ID COUNTER
  CONSTRAINT ID PRIMARY KEY,
  Domain TEXT 128,
  IP TEXT 40,
  Action TEXT 10,
  xDate DATE 8,
  Info TEXT 255
  )


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: What is wrong with the create table statement for Jet SQL ?

2000-11-10 Thread CF-Talk

Thanks for all who helped.
The DATE didn't need a value.
Plus the ( ) where missing behind TEXT.
Daniel, you can take TEXT as well for Access instead of varchar, see this
article: http://www.citilink.com/~jgarrick/vbasic/database/jetsql.html
It worked fine for me !

The correct syntax is:


CREATE TABLE EventLog
  (
 ID COUNTER
  CONSTRAINT ID PRIMARY KEY,
  Domain TEXT(128),
  IP TEXT(40),
  Action TEXT(10),
  xDate DATE 8,
  Info TEXT(255)
  )

- Original Message -
From: "Joseph Thompson" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Samstag, 11. November 2000 01:03
Subject: Re: What is wrong with the create table statement for Jet SQL ?


umm.  did you try putting the size of the feilds in "()"
eg; text (128)?  and I don't think you need to size the DATE type feild.

CREATE TABLE EventLog
  (
 ID COUNTER
  CONSTRAINT ID PRIMARY KEY,
  Domain TEXT 128,
  IP TEXT 40,
  Action TEXT 10,
  xDate DATE 8,
  Info TEXT 255
  )



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]