INSERT INTO user (userid,username,password,active,school_id,perms) VALUES (NULL,'#arguments.userArgs.username#','#arguments.userArgs.password#',#isActive# ,#arguments.userArgs.school#,#arguments.userArgs.permdesc#) ...... yadayadayada ...... [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => aparsons [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > > > > > [/quote] you're not VARing isActive....this will cause you grief eventually. .. .. .. [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => PaulH *TMM* [ip] => paul@sustainabl [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Cannot pass form field variable from Flash form to CFC - Coldfusion Flash Integration

Cannot pass form field variable from Flash form to CFC - Coldfusion Flash Integration

hello, could someone please help me with an issue i'm having.... i'm trying to pass data from flash form fields into my coldfusion component using a insert into (mysql statement)... but i can't add any data to my database.... <cfcomponent> <cffunction name="InsertData" access="remote" returntype="string"> <cfquery datasource="mysql2" name="InsertData"> INSERT INTO newtable2 (NAME_USER, NAME_EMAIL) VALUES ("#name#", "#email#") </cfquery> <cfreturn InsertData> </cffunction> </cfcomponent> and i'm getting the following error... Variable name is undefined. my UI Input text field are names: name & email... i've done all the bindings correctly..(from webservice to input field) i've set a WSDL URL and operation name i've added ...

  1. #1

    Default Cannot pass form field variable from Flash form to CFC

    hello,

    could someone please help me with an issue i'm having....

    i'm trying to pass data from flash form fields into my coldfusion component
    using a insert into (mysql statement)...

    but i can't add any data to my database....

    <cfcomponent>
    <cffunction name="InsertData" access="remote" returntype="string">

    <cfquery datasource="mysql2" name="InsertData">
    INSERT INTO newtable2 (NAME_USER, NAME_EMAIL)
    VALUES ("#name#", "#email#")
    </cfquery>
    <cfreturn InsertData>
    </cffunction>
    </cfcomponent>

    and i'm getting the following error...

    Variable name is undefined.

    my UI Input text field are names: name & email...
    i've done all the bindings correctly..(from webservice to input field)
    i've set a WSDL URL and operation name

    i've added the getURL to my submit button that goes to a CFM
    page with the following code...

    <cfinvoke webservice="someURL.cfc?wsdl" method="InsertData"
    component="mysql.myCFC" returnvariable="InsertData"></cfinvoke>

    Am i doing something wrong ?

    and that should input the data into the database but it's not...

    could someone PLEASE help me with this Data Integration issue...

    i just can't figure out why the data won't pass....

    I need this to work for a project so any help in the right direction with be
    great :)

    thank you for all your help in advance

    greg carron
    flash programmer
    [email]gregkingweb.com[/email]

    modernkaos Guest

  2. #2

    Default Re: Cannot pass form field variable from Flash form toCFC

    function insertUser()
    {
    checkpasswords();
    var dummyVar:String=""; // to handle remoting quirk
    // setup args call to insertUser method
    var thisUser = {
    dsn:"pjas",
    username: _root.username.text,
    password: _root.password.text,
    active: _root.active.value,
    school: _root.school.selectedItem.data,
    permdesc: _root.permdesc.selectedItem.data,
    fname: _root.fname.text,
    lname: _root.lname.text,
    email: _root.email.text,
    phone1: _root.phone1.text
    }
    <cfoutput>
    ......
    yadayadayada
    ......


    Then in your CFC:

    <cffunction name="insertUser" output="false" description="Inserts a new user
    into the database" access="remote" returntype="query">
    <cfargument name="userArgs" type="struct">
    <cfset var addUser = "">
    <cfset var lastID="">
    <cfset var addUserContact="">
    <cfset var GetMyRegion="">
    <cfset var addUserRegion="">
    <cfset var results="">
    <!-- Set the active flag since Flash won't easily change from TRUE to 1-->
    <cfif arguments.userArgs.active>
    <cfset isActive = 1>
    <cfelse>
    <cfset isActive=0>
    </cfif>

    <cftransaction> <!--- missing type of isolation?? --->
    <cftry>
    <!--- add user --->
    <cfquery name="addUser" Datasource="#arguments.userArgs.dsn#">
    INSERT INTO user (userid,username,password,active,school_id,perms)
    VALUES
    (NULL,'#arguments.userArgs.username#','#arguments. userArgs.password#',#isActive#
    ,#arguments.userArgs.school#,#arguments.userArgs.p ermdesc#)
    </cfquery>

    ......
    yadayadayada
    ......

    aparsons Guest

  3. #3

    Default Re: Cannot pass form field variable from Flash form to CFC

    aparsons wrote:
    > <cffunction name="insertUser" output="false" description="Inserts a new user
    > into the database" access="remote" returntype="query">
    > <cfargument name="userArgs" type="struct">
    > <cfset var addUser = "">
    > <cfset var lastID="">
    > <cfset var addUserContact="">
    > <cfset var GetMyRegion="">
    > <cfset var addUserRegion="">
    > <cfset var results="">
    > <!-- Set the active flag since Flash won't easily change from TRUE to 1-->
    > <cfif arguments.userArgs.active>
    > <cfset isActive = 1>
    > <cfelse>
    > <cfset isActive=0>
    > </cfif>
    you're not VARing isActive....this will cause you grief eventually.

    <cfset var isActive=1>
    ..
    ..
    ..
    <cfif NOT arguments.userArgs.active>
    <cfset isActive = 0>
    </cfif>

    PaulH *TMM* Guest

Similar Threads

  1. Question how to set hidden variable value on paent CF flash form from a popup form
    By Unregistered in forum Brainstorming Area
    Replies: 0
    Last Post: April 2nd, 01:21 PM
  2. Pass URL Parameter from html form to flash form
    By keann in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: January 10th, 05:15 PM
  3. Create a variable using form field
    By Dan K. in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: July 8th, 01:14 AM
  4. how do I pass the FLASH version of the form variable tothe query in CF 7.0
    By SharedDynamics in forum Coldfusion - Advanced Techniques
    Replies: 3
    Last Post: March 10th, 09:13 PM
  5. Replies: 3
    Last Post: May 13th, 12:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •