Yeah that I know, what I am trying to do is keep the routine somewhat
generic and pass all the form variables in without having to designate
individual cfargument statements (I have over 40 variables- don't ask,
they went form crazy ) so my basic method is necessary just was
wondering if one really is better than the other.
On Thu, 14 Oct 2004 14:03:15 -0500, Raymond Camden <[EMAIL PROTECTED]> wrote:
> Actually, it doesn't matter what the form names are. Consider a CFC
> method that takes 2 args, name and age. Your form fields could be
> called Darth and Luke, and this will work fine:
>
> (in calling document)
> <cfset theCFCInstance.theMethod(form.darth,form.luke)>
>
> Now in your CFC you have....
> <cffunction name="theMethod" ....>
> <cfargument name="name" ....>
> <cfargument name="age" ....>
>
> and then you can do your db call here, and it doesn't what the db
> columns are. Imagine they are personName and personAge. The following
> code is ok:
>
> <cfquery ....>
> insert into foo(personName,personAge)
> values('#arguments.name#',#arguments.age#)
>
> The point is, it doesn't matter what your form fields are called. It
> doesn't matter what your arguments are. Use names that make sense.
>
>
>
>
>
> On Thu, 14 Oct 2004 13:57:14 -0400, sonicDivx <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to decide which method to pass form data to a CFC that is
> going
> > to add the data to a DB.
> >
> > My form field names are not the same as the database fieldnames so I need
> to
> > pass the following;
> >
> > formfield name | database fieldname | formfield value
> >
> > So Was going to do an Array but was wondering if doing a nested Structure
> > wouldn't be easier. Performance is a minor issue.
> >
> > Any thoughts
> > Thanks
> > Kevin
> >
> >________________________________
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

