On 22/09/05, Nando <[EMAIL PROTECTED]
> wrote:
Stephan,Have you figured out how to debug / dump stuff from within CFC's so you can see what's going on?Is this a numeric field?WHERE DRB_Number = '#arguments.contactDetails.GetDRBNumber()#'-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Stephen AdamsSent: Thursday, September 22, 2005 4:04 PM
To: [email protected]
Subject: Re: [CFCDev] How to find out information about the type of object you are using.Yes I've amended my query to look like this:
<cfquery name="updateContactDetails" datasource="#variables.DSN#">
UPDATE tbl_EBR_Institution
SET Institution_Address1 = '#arguments.contactDetails.GetAddress1()#',
Institution_Address2 = '#arguments.contactDetails.GetAddress2()#',
Institution_Address3 = '#arguments.contactDetails.GetAddress3()#',
Institution_Address4 = '#arguments.contactDetails.GetAddress4()#',
Institution_PostCode = '#arguments.contactDetails.GetPostcode()#',
Name_of_head = '#arguments.contactDetails.GetHeadName()#',
TelNo_of_head = '#arguments.contactDetails.GetHeadTelNo()#',
FaxNo_of_head = '#arguments.contactDetails.GetHeadFaxNo()#',
Email_of_head = '#arguments.contactDetails.GetHeadEmail()#'
WHERE DRB_Number = '#arguments.contactDetails.GetDRBNumber()#'
</cfquery>
Still not updating the record.
On 22/09/05, RADEMAKERS Tanguy <[EMAIL PROTECTED]> wrote:do you get an error message from your db or do you get no error but nothing is updated? Have you tried scoping the variables in the cfquery like:Address1 = '#arguments.contactDetails.GetAddress1()#',/t
Yes I just did, that worked, but now the update query does not seem to be updating even the values are being set in the Bean, and I can access them using the Get methods. I'm going to look at the Debug and see if the SQL is workign correctly.
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Stephen Adams
Sent: Thursday, September 22, 2005 2:52 PM
To: [email protected]
Subject: Re: [CFCDev] How to find out information about the type of object you are using.
Slowly getting there, thanks for the help.
On 22/09/05, RADEMAKERS Tanguy < [EMAIL PROTECTED] > wrote:just thinking out loud - have you tried<cfargument name="contactDetails" type="Helpdesk_dev.cfc.Beans.ContactDetailsBean" required="true" />/t
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Stephen Adams
Sent: Thursday, September 22, 2005 2:30 PM
To: [email protected]
Subject: [CFCDev] How to find out information about the type of object you are using.Hi all,----------------------------------------------------------
I'm trying to use a DAO component and a Bean to update details submitted by a form. I'm tryng to use the method that Joe Reinhart set out in his blog ( http://clearsoftware.net/client/index.cfm?mode=entry&entry=3D1115E7-E081-2BAC-6953DA4394855DDB ) where you use a Bean to gather all the form fields together, then pass the Bean object to DAO object, and the update query.
Unfortunately everytime I pass my Bean to the DAO object I get an error message telling me that it's not an object type of my Bean! Is there anyway I can check, what my Bean object contains and what type it is.
Here's what my code looks like:
contactDetails = createObject("component", "Helpdesk_dev.cfc.Beans.ContactDetailsBean");
contactDetails.SetDRBNumber('#FORM.txtDRBNumber#');
contactDetails.SetDRBName('#FORM.txtDRBName#');
contactDetails.SetAddress1('#FORM.txtAddress1#');
contactDetails.SetAddress2('#FORM.txtAddress2#');
contactDetails.SetAddress3('#FORM.txtAddress3#');
contactDetails.SetAddress4('#FORM.txtTown#');
contactDetails.SetPostcode('#FORM.txtPostcode#');
contactDetails.SetHeadName ('#FORM.txtContactName#');
contactDetails.SetHeadTelNo('#FORM.txtContactTel#');
contactDetails.SetHeadFaxNo('#FORM.txtContactFax#');
contactDetails.SetHeadEmail('#FORM.txtContactEmail#');
// pass Bean containing form field details to update method
objContactDetails = createObject("component", "Helpdesk_dev.cfc.DAO.DrbDAO").init(#application.DSN#);
updatedContactDetails = objContactDetails.update(contactDetails);
Then the update method from the DAO bean looks like this:
<cffunction name="update" access="public" returntype="struct" output="false">
<cfargument name="contactDetails" type="ContactDetailsBean" required="true" />
<cfquery name="updateContactDetails" datasource="#variables.DSN#">
UPDATE tbl_Contact_details
SET Address1 = '#contactDetails.GetAddress1()#',
Address2 = '#contactDetails.GetAddress2()#',
Address3 = '#contactDetails.GetAddress3()#',
Address4 = '#contactDetails.GetAddress4()#',
PostCode = '#contactDetails.GetPostcode()#',
Name_of_head = '#contactDetails.GetHeadName()#',
TelNo_of_head = '#contactDetails.GetHeadTelNo()#',
FaxNo_of_head = '#contactDetails.GetHeadFaxNo()#',
Email_of_head = '#contactDetails.GetHeadEmail()#'
WHERE DRB_Number = '#contactDetails.GetDRBNumber()#'
</cfquery>
</cffunction>
I'm stumped by this?
Stephen
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
