Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-05 Thread Tom Chiverton
On Tuesday 04 Mar 2008, Greg Morphis wrote:
 Tom.. you mean something like this... ?

Yes.

 What timeout should it have? is 5 seconds good enough?
 Thanks!

It depends.
On my machine here, a typical app takes about 5 seconds to set all the 
application scope'd stuff up from scratch.
I've set the lock timeout to 30 seconds, on the grounds that if the much 
beefier live system takes that long, Something Is Up.

-- 
Tom Chiverton
Helping to carefully coordinate holistic segments
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Tom Chiverton
On Monday 03 Mar 2008, Greg Morphis wrote:
 No, no aborts.. and yeah.. it returns something..
 Something's wrong because like I said CF stops processing..

Do you have a per-application or server wide exception handler that could be 
swallowing the error it looks like it must be throwing ?

-- 
Tom Chiverton
Helping to authoritatively conquer guinine m-commerce
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Greg Morphis
Naaa.. I mean we do have an error template but it normally fires with errors..
If I misspell something on a .cfm page, it displays all the error info.
I've just noticed that when there's something wrong within a CFC it just stops..

For example if I have a
cfoutput#session.user.emplid#/cfoutput
cfset qGroupsX = application.userGateway.getGroupsForUser(emplid =
'0012345') !--- error in here somewhere ---

cfdump var=#application# /

The output gets displays but no dump..

I have a login page that created the application.userGateway so it
could check security because the onApplicationStart in the .cfc
doesn't seem to fire before the login (not sure why). Anyways.. I
wonder if that was causing the error.. I wrapped it in a
cfif structkeyexists(application,userGateway)
 ... create the application.userGateway
/cfif

But I want to test... could 2 creates cause the problem? I would
really like some better error messages instead of CF just stopping
(only happens in errors within the CFC) what it's doing...




On Tue, Mar 4, 2008 at 3:31 AM, Tom Chiverton
[EMAIL PROTECTED] wrote:
 On Monday 03 Mar 2008, Greg Morphis wrote:
  No, no aborts.. and yeah.. it returns something..
  Something's wrong because like I said CF stops processing..

 Do you have a per-application or server wide exception handler that could be
 swallowing the error it looks like it must be throwing ?

 --
 Tom Chiverton
 Helping to authoritatively conquer guinine m-commerce
 on: http://thefalken.livejournal.com

 

 This email is sent for and on behalf of Halliwells LLP.

 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under registered number OC307980 whose registered office address is at 
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
 of members is available for inspection at the registered office. Any 
 reference to a partner in relation to Halliwells LLP means a member of 
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

 This email is intended only for the use of the addressee named above and may 
 be confidential or legally privileged.  If you are not the addressee you must 
 not read it and must not use any information contained in nor copy it nor 
 inform any person other than Halliwells LLP or the addressee of its existence 
 or contents.  If you have received this email in error please delete it and 
 notify Halliwells LLP IT Department on 0870 365 2500.

 For more information about Halliwells LLP visit www.halliwells.com.

 

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread James Holmes
You have of course been deleting and re-creating the
APPLICATION.userGateway object after you've been making these changes,
right?

On Tue, Mar 4, 2008 at 10:59 PM, Greg Morphis [EMAIL PROTECTED] wrote:
 Naaa.. I mean we do have an error template but it normally fires with errors..
  If I misspell something on a .cfm page, it displays all the error info.
  I've just noticed that when there's something wrong within a CFC it just 
 stops..

  For example if I have a
  cfoutput#session.user.emplid#/cfoutput

 cfset qGroupsX = application.userGateway.getGroupsForUser(emplid =
  '0012345') !--- error in here somewhere ---

  cfdump var=#application# /

  The output gets displays but no dump..

  I have a login page that created the application.userGateway so it
  could check security because the onApplicationStart in the .cfc
  doesn't seem to fire before the login (not sure why). Anyways.. I
  wonder if that was causing the error.. I wrapped it in a
  cfif structkeyexists(application,userGateway)
  ... create the application.userGateway
  /cfif

  But I want to test... could 2 creates cause the problem? I would
  really like some better error messages instead of CF just stopping
  (only happens in errors within the CFC) what it's doing...






  On Tue, Mar 4, 2008 at 3:31 AM, Tom Chiverton
  [EMAIL PROTECTED] wrote:
   On Monday 03 Mar 2008, Greg Morphis wrote:
No, no aborts.. and yeah.. it returns something..
Something's wrong because like I said CF stops processing..
  
   Do you have a per-application or server wide exception handler that could 
 be
   swallowing the error it looks like it must be throwing ?
  
   --
   Tom Chiverton
   Helping to authoritatively conquer guinine m-commerce
   on: http://thefalken.livejournal.com
  
   
  
   This email is sent for and on behalf of Halliwells LLP.
  
   Halliwells LLP is a limited liability partnership registered in England 
 and Wales under registered number OC307980 whose registered office address is 
 at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A 
 list of members is available for inspection at the registered office. Any 
 reference to a partner in relation to Halliwells LLP means a member of 
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.
  
   CONFIDENTIALITY
  
   This email is intended only for the use of the addressee named above and 
 may be confidential or legally privileged.  If you are not the addressee you 
 must not read it and must not use any information contained in nor copy it 
 nor inform any person other than Halliwells LLP or the addressee of its 
 existence or contents.  If you have received this email in error please 
 delete it and notify Halliwells LLP IT Department on 0870 365 2500.
  
   For more information about Halliwells LLP visit www.halliwells.com.
  
  

  

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Greg Morphis
I have the timeout set for 30 seconds for testing... but as I said
below, I wonder if created it twice once in the act_login.cfm page and
once in the application.cfc file was causing the problems

On Tue, Mar 4, 2008 at 8:05 AM, James Holmes [EMAIL PROTECTED] wrote:
 You have of course been deleting and re-creating the
 APPLICATION.userGateway object after you've been making these changes,
 right?


 On Tue, Mar 4, 2008 at 10:59 PM, Greg Morphis [EMAIL PROTECTED] wrote:
  Naaa.. I mean we do have an error template but it normally fires with 
  errors..
   If I misspell something on a .cfm page, it displays all the error info.
   I've just noticed that when there's something wrong within a CFC it just 
  stops..
 
   For example if I have a
   cfoutput#session.user.emplid#/cfoutput
 
  cfset qGroupsX = application.userGateway.getGroupsForUser(emplid =
   '0012345') !--- error in here somewhere ---
 
   cfdump var=#application# /
 
   The output gets displays but no dump..
 
   I have a login page that created the application.userGateway so it
   could check security because the onApplicationStart in the .cfc
   doesn't seem to fire before the login (not sure why). Anyways.. I
   wonder if that was causing the error.. I wrapped it in a
   cfif structkeyexists(application,userGateway)
   ... create the application.userGateway
   /cfif
 
   But I want to test... could 2 creates cause the problem? I would
   really like some better error messages instead of CF just stopping
   (only happens in errors within the CFC) what it's doing...
 
 
 
 
 
 
   On Tue, Mar 4, 2008 at 3:31 AM, Tom Chiverton
   [EMAIL PROTECTED] wrote:
On Monday 03 Mar 2008, Greg Morphis wrote:
 No, no aborts.. and yeah.. it returns something..
 Something's wrong because like I said CF stops processing..
   
Do you have a per-application or server wide exception handler that 
  could be
swallowing the error it looks like it must be throwing ?
   
--
Tom Chiverton
Helping to authoritatively conquer guinine m-commerce
on: http://thefalken.livejournal.com
   

   
This email is sent for and on behalf of Halliwells LLP.
   
Halliwells LLP is a limited liability partnership registered in England 
  and Wales under registered number OC307980 whose registered office address 
  is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. 
   A list of members is available for inspection at the registered office. 
  Any reference to a partner in relation to Halliwells LLP means a member of 
  Halliwells LLP.  Regulated by The Solicitors Regulation Authority.
   
CONFIDENTIALITY
   
This email is intended only for the use of the addressee named above and 
  may be confidential or legally privileged.  If you are not the addressee 
  you must not read it and must not use any information contained in nor copy 
  it nor inform any person other than Halliwells LLP or the addressee of its 
  existence or contents.  If you have received this email in error please 
  delete it and notify Halliwells LLP IT Department on 0870 365 2500.
   
For more information about Halliwells LLP visit www.halliwells.com.
   
   
 
 

 

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Tom Chiverton
On Tuesday 04 Mar 2008, Greg Morphis wrote:
 I have the timeout set for 30 seconds for testing... but as I said
 below, I wonder if created it twice once in the act_login.cfm page and
 once in the application.cfc file was causing the problems

It's possible you have a race condition, I suppose, though the lack of a 
proper error is a pain.
FWIW we create all our application scoped CFCs within a named lock.

-- 
Tom Chiverton
Helping to centrally industrialize total e-tailers
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Sonny Savage
Are you sure it isn't due to the data type specified in the cfqueryparam?
It looks like your ID has leading zeros which would make it a character
string rather than numeric...

On Tue, Mar 4, 2008 at 10:15 AM, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Tuesday 04 Mar 2008, Greg Morphis wrote:
  I have the timeout set for 30 seconds for testing... but as I said
  below, I wonder if created it twice once in the act_login.cfm page and
  once in the application.cfc file was causing the problems

 It's possible you have a race condition, I suppose, though the lack of a
 proper error is a pain.
 FWIW we create all our application scoped CFCs within a named lock.

 --
 Tom Chiverton
 Helping to centrally industrialize total e-tailers
 on: http://thefalken.livejournal.com

 

 This email is sent for and on behalf of Halliwells LLP.

 Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office address
 is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.
  A list of members is available for inspection at the registered office. Any
 reference to a partner in relation to Halliwells LLP means a member of
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

 CONFIDENTIALITY

 This email is intended only for the use of the addressee named above and
 may be confidential or legally privileged.  If you are not the addressee you
 must not read it and must not use any information contained in nor copy it
 nor inform any person other than Halliwells LLP or the addressee of its
 existence or contents.  If you have received this email in error please
 delete it and notify Halliwells LLP IT Department on 0870 365 2500.

 For more information about Halliwells LLP visit www.halliwells.com.

 

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Greg Morphis
Yea its a varchar field in the database. That part is correct

On 3/4/08, Sonny Savage [EMAIL PROTECTED] wrote:
 Are you sure it isn't due to the data type specified in the cfqueryparam?
 It looks like your ID has leading zeros which would make it a character
 string rather than numeric...

 On Tue, Mar 4, 2008 at 10:15 AM, Tom Chiverton
 [EMAIL PROTECTED]
 wrote:

  On Tuesday 04 Mar 2008, Greg Morphis wrote:
   I have the timeout set for 30 seconds for testing... but as I said
   below, I wonder if created it twice once in the act_login.cfm page and
   once in the application.cfc file was causing the problems
 
  It's possible you have a race condition, I suppose, though the lack of a
  proper error is a pain.
  FWIW we create all our application scoped CFCs within a named lock.
 
  --
  Tom Chiverton
  Helping to centrally industrialize total e-tailers
  on: http://thefalken.livejournal.com
 
  
 
  This email is sent for and on behalf of Halliwells LLP.
 
  Halliwells LLP is a limited liability partnership registered in England
  and Wales under registered number OC307980 whose registered office address
  is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3
 3EB.
   A list of members is available for inspection at the registered office.
 Any
  reference to a partner in relation to Halliwells LLP means a member of
  Halliwells LLP.  Regulated by The Solicitors Regulation Authority.
 
  CONFIDENTIALITY
 
  This email is intended only for the use of the addressee named above and
  may be confidential or legally privileged.  If you are not the addressee
 you
  must not read it and must not use any information contained in nor copy it
  nor inform any person other than Halliwells LLP or the addressee of its
  existence or contents.  If you have received this email in error please
  delete it and notify Halliwells LLP IT Department on 0870 365 2500.
 
  For more information about Halliwells LLP visit www.halliwells.com.
 
 

 

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-04 Thread Greg Morphis
Tom.. you mean something like this... ?

  cflock scope=application timeout=5 type=Exclusive
 cfset application.userGateway ...
 cfset application.groupGateway ...
  /cflock

etc..

What timeout should it have? is 5 seconds good enough?
Thanks!

On Tue, Mar 4, 2008 at 9:15 AM, Tom Chiverton
[EMAIL PROTECTED] wrote:
 On Tuesday 04 Mar 2008, Greg Morphis wrote:
   I have the timeout set for 30 seconds for testing... but as I said
   below, I wonder if created it twice once in the act_login.cfm page and
   once in the application.cfc file was causing the problems

  It's possible you have a race condition, I suppose, though the lack of a
  proper error is a pain.
  FWIW we create all our application scoped CFCs within a named lock.

  --
  Tom Chiverton
  Helping to centrally industrialize total e-tailers

 on: http://thefalken.livejournal.com

  

  This email is sent for and on behalf of Halliwells LLP.

  Halliwells LLP is a limited liability partnership registered in England and 
 Wales under registered number OC307980 whose registered office address is at 
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
 of members is available for inspection at the registered office. Any 
 reference to a partner in relation to Halliwells LLP means a member of 
 Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

  CONFIDENTIALITY

  This email is intended only for the use of the addressee named above and may 
 be confidential or legally privileged.  If you are not the addressee you must 
 not read it and must not use any information contained in nor copy it nor 
 inform any person other than Halliwells LLP or the addressee of its existence 
 or contents.  If you have received this email in error please delete it and 
 notify Halliwells LLP IT Department on 0870 365 2500.

  For more information about Halliwells LLP visit www.halliwells.com.

  

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

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


CFC, OOP I have another acronym for you.. WTF?

2008-03-03 Thread Greg Morphis
So I'm trying to learn the whole OO stuff behind CF..
I've got a user gateway, dao, bean created.. but something is up with
one of the functions...

I'm creating the gateway in the application.cfc
cfset application.userGateway = createObject(component,
cfc.users.UserGateway).init( DSN = application.DSN ) /

my Gateway works here..
cfset foo = application.userGateway.getUser(emplid = '0012345') /

I can see in the debug where it's called and ran...
qUser (Datasource=j00mamma, Time=539ms, Records=1) in
C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\qRunner\cfcs\users\UserGateway.cfc
@ 16:08:22.022

SELECT
emplid,isadmin
FROM
users_tbl
WHERE
emplid = ?
AND
isactive = 1


Query Parameter Value(s) -
Parameter #1(cf_sql_varchar) = 0012345

Okay, so that's all cool.. so why is THIS not working

cfset qGroupsX = application.userGateway.getGroupsForUser(emplid = '0012345')

CF just stops processing.. anything that should have followed the call
is not there.. so I look in my GateWay and here's my query...

cffunction name=getGroupsForUser access=public output=false
returnType=query hint=returns a recordset of groups per user
cfargument name=emplid default= required=true

cfset var qGroups =  /

cfquery name=qGroups datasource=#variables.DSN#
select gt.group_id, gt.group_name
from groups_tbl gt
left join group_user gu
on gt.group_id = gu.group_id
and gu.emplid = cfqueryparam cfsqltype=cf_sql_varchar
value=#arguments.emplid#


/cfquery

cfreturn qGroups /


/cffunction


Nothing fancy... am I'm missing something here? Why isnt this working?

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-03 Thread Greg Morphis
If I dump the application scope, I can see the userGateway and function..

usergateway 
component qRunner.cfcs.users.UserGateway
GETGROUPSFORUSER
function getGroupsForUser
Arguments:
NameRequiredTypeDefault
emplid  RequiredAny [empty string]
Return Type:query
Roles:  
Access: public
Output: false

I'm baffled!



On Mon, Mar 3, 2008 at 4:14 PM, Greg Morphis [EMAIL PROTECTED] wrote:
 So I'm trying to learn the whole OO stuff behind CF..
  I've got a user gateway, dao, bean created.. but something is up with
  one of the functions...

  I'm creating the gateway in the application.cfc
  cfset application.userGateway = createObject(component,
  cfc.users.UserGateway).init( DSN = application.DSN ) /

  my Gateway works here..
  cfset foo = application.userGateway.getUser(emplid = '0012345') /

  I can see in the debug where it's called and ran...
  qUser (Datasource=j00mamma, Time=539ms, Records=1) in
  
 C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\qRunner\cfcs\users\UserGateway.cfc
  @ 16:08:22.022

 SELECT
 emplid,isadmin
 FROM
 users_tbl
 WHERE
 emplid = ?
 AND
 isactive = 1


  Query Parameter Value(s) -
  Parameter #1(cf_sql_varchar) = 0012345

  Okay, so that's all cool.. so why is THIS not working

  cfset qGroupsX = application.userGateway.getGroupsForUser(emplid = 
 '0012345')

  CF just stops processing.. anything that should have followed the call
  is not there.. so I look in my GateWay and here's my query...

 cffunction name=getGroupsForUser access=public output=false
  returnType=query hint=returns a recordset of groups per user
 cfargument name=emplid default= required=true

 cfset var qGroups =  /

 cfquery name=qGroups datasource=#variables.DSN#
 select gt.group_id, gt.group_name
 from groups_tbl gt
 left join group_user gu
 on gt.group_id = gu.group_id
 and gu.emplid = cfqueryparam 
 cfsqltype=cf_sql_varchar
  value=#arguments.emplid#


 /cfquery

 cfreturn qGroups /


 /cffunction


  Nothing fancy... am I'm missing something here? Why isnt this working?


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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-03 Thread Charlie Griefer
you sure you don't have a cfabort or 3 sprinkled in there for
debugging purposes?

On Mon, Mar 3, 2008 at 2:49 PM, Greg Morphis [EMAIL PROTECTED] wrote:
 If I dump the application scope, I can see the userGateway and function..

  usergateway
  component qRunner.cfcs.users.UserGateway
  GETGROUPSFORUSER
  function getGroupsForUser
  Arguments:
  NameRequiredTypeDefault
  emplid  RequiredAny [empty string]
  Return Type:query
  Roles:
  Access: public
  Output: false

  I'm baffled!





  On Mon, Mar 3, 2008 at 4:14 PM, Greg Morphis [EMAIL PROTECTED] wrote:
   So I'm trying to learn the whole OO stuff behind CF..
I've got a user gateway, dao, bean created.. but something is up with
one of the functions...
  
I'm creating the gateway in the application.cfc
cfset application.userGateway = createObject(component,
cfc.users.UserGateway).init( DSN = application.DSN ) /
  
my Gateway works here..
cfset foo = application.userGateway.getUser(emplid = '0012345') /
  
I can see in the debug where it's called and ran...
qUser (Datasource=j00mamma, Time=539ms, Records=1) in

 C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\qRunner\cfcs\users\UserGateway.cfc
@ 16:08:22.022
  
   SELECT
   emplid,isadmin
   FROM
   users_tbl
   WHERE
   emplid = ?
   AND
   isactive = 1
  
  
Query Parameter Value(s) -
Parameter #1(cf_sql_varchar) = 0012345
  
Okay, so that's all cool.. so why is THIS not working
  
cfset qGroupsX = application.userGateway.getGroupsForUser(emplid = 
 '0012345')
  
CF just stops processing.. anything that should have followed the call
is not there.. so I look in my GateWay and here's my query...
  
   cffunction name=getGroupsForUser access=public output=false
returnType=query hint=returns a recordset of groups per user
   cfargument name=emplid default= required=true
  
   cfset var qGroups =  /
  
   cfquery name=qGroups datasource=#variables.DSN#
   select gt.group_id, gt.group_name
   from groups_tbl gt
   left join group_user gu
   on gt.group_id = gu.group_id
   and gu.emplid = cfqueryparam 
 cfsqltype=cf_sql_varchar
value=#arguments.emplid#
  
  
   /cfquery
  
   cfreturn qGroups /
  
  
   /cffunction
  
  
Nothing fancy... am I'm missing something here? Why isnt this working?
  

  

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-03 Thread Cutter (CFRelated)
Have you run this query directly at the db, to see if it is in fact 
returning anything? Your function looks correct...

Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Greg Morphis wrote:
 So I'm trying to learn the whole OO stuff behind CF..
 I've got a user gateway, dao, bean created.. but something is up with
 one of the functions...
 
 I'm creating the gateway in the application.cfc
 cfset application.userGateway = createObject(component,
 cfc.users.UserGateway).init( DSN = application.DSN ) /
 
 my Gateway works here..
 cfset foo = application.userGateway.getUser(emplid = '0012345') /
 
 I can see in the debug where it's called and ran...
 qUser (Datasource=j00mamma, Time=539ms, Records=1) in
 C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\qRunner\cfcs\users\UserGateway.cfc
 @ 16:08:22.022
 
   SELECT
   emplid,isadmin
   FROM
   users_tbl
   WHERE
   emplid = ?
   AND
   isactive = 1
 
 
 Query Parameter Value(s) -
 Parameter #1(cf_sql_varchar) = 0012345
 
 Okay, so that's all cool.. so why is THIS not working
 
 cfset qGroupsX = application.userGateway.getGroupsForUser(emplid = 
 '0012345')
 
 CF just stops processing.. anything that should have followed the call
 is not there.. so I look in my GateWay and here's my query...
 
   cffunction name=getGroupsForUser access=public output=false
 returnType=query hint=returns a recordset of groups per user
   cfargument name=emplid default= required=true
   
   cfset var qGroups =  /
   
   cfquery name=qGroups datasource=#variables.DSN#
   select gt.group_id, gt.group_name
   from groups_tbl gt
   left join group_user gu
   on gt.group_id = gu.group_id
   and gu.emplid = cfqueryparam cfsqltype=cf_sql_varchar
 value=#arguments.emplid#
   
   
   /cfquery
   
   cfreturn qGroups /
   
   
   /cffunction
 
 
 Nothing fancy... am I'm missing something here? Why isnt this working?
 
 

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-03 Thread Greg Morphis
No, no aborts.. and yeah.. it returns something..
Something's wrong because like I said CF stops processing..
It does this when there are errors in the CFC..
But like I said the getUser works.. the getGroupsForUser doesn't.
The only thing I edited was the emplid for posting purposes.. Other
than that.. right from the page.

I changed the query to
select 1 as group_id, 'Blah' as group_name
from dual

and no luck..


On Mon, Mar 3, 2008 at 4:55 PM, Cutter (CFRelated)
[EMAIL PROTECTED] wrote:
 Have you run this query directly at the db, to see if it is in fact
  returning anything? Your function looks correct...

  Steve Cutter Blades
  Adobe Certified Professional
  Advanced Macromedia ColdFusion MX 7 Developer
  _
  http://blog.cutterscrossing.com



  Greg Morphis wrote:
   So I'm trying to learn the whole OO stuff behind CF..
   I've got a user gateway, dao, bean created.. but something is up with
   one of the functions...
  
   I'm creating the gateway in the application.cfc
   cfset application.userGateway = createObject(component,
   cfc.users.UserGateway).init( DSN = application.DSN ) /
  
   my Gateway works here..
   cfset foo = application.userGateway.getUser(emplid = '0012345') /
  
   I can see in the debug where it's called and ran...
   qUser (Datasource=j00mamma, Time=539ms, Records=1) in
   
 C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\qRunner\cfcs\users\UserGateway.cfc
   @ 16:08:22.022
  
 SELECT
 emplid,isadmin
 FROM
 users_tbl
 WHERE
 emplid = ?
 AND
 isactive = 1
  
  
   Query Parameter Value(s) -
   Parameter #1(cf_sql_varchar) = 0012345
  
   Okay, so that's all cool.. so why is THIS not working
  
   cfset qGroupsX = application.userGateway.getGroupsForUser(emplid = 
 '0012345')
  
   CF just stops processing.. anything that should have followed the call
   is not there.. so I look in my GateWay and here's my query...
  
 cffunction name=getGroupsForUser access=public output=false
   returnType=query hint=returns a recordset of groups per user
 cfargument name=emplid default= required=true
  
 cfset var qGroups =  /
  
 cfquery name=qGroups datasource=#variables.DSN#
 select gt.group_id, gt.group_name
 from groups_tbl gt
 left join group_user gu
 on gt.group_id = gu.group_id
 and gu.emplid = cfqueryparam 
 cfsqltype=cf_sql_varchar
   value=#arguments.emplid#
  
  
 /cfquery
  
 cfreturn qGroups /
  
  
 /cffunction
  
  
   Nothing fancy... am I'm missing something here? Why isnt this working?
  
  


 

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

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


Re: CFC, OOP I have another acronym for you.. WTF?

2008-03-03 Thread Dominic Watson
As a debugging process, if you haven't done this already, comment out the
body of the function and add the line:

cfreturn QueryNew('')

If you are still having the problem, then it is not with the method call.
Could we see the method that is working (getUser)?

One last thing, is empId definately a varchar? If it wasn't that would cause
an error (cfqueryparam cfsqltype=cf_sql_varchar...)

HTH,

Dominic

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


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

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