2 Replies Latest reply on Jul 13, 2010 5:57 AM by Reed Powell

    CFinsert (another route - from previous post)

    HappyHour-SC

      I query a "Clientsinfo" table to get the LASTNAME,FIRSTNAME from a "form" being submited base on a phonenumber in the form.

       

      Now I want to INSERT the form fields - Plus the query above - LASTNAME,FIRSTNAME.

       

       

      I used: 
         
      <CFINSERT DATASOURCE="storefront" TABLENAME="sales" formFields = "client_id,booksales,booktitle,lastname,firstname">

      It works - BUT the LASTNAME OR FIRSTNAME does NOT get inserted.  The fields are blank.

       

       

       

      Do I make things difficult or what??? 

        • 1. Re: CFinsert (another route - from previous post)
          Reed Powell Level 3

          Couple of questions so we can help you out:

          1. What database type?

          2. When you say that "it works" does that mean that you verified that a new record appeared in the table?

          3. If a new record appeared, what other data from your form variables were successfully entered?

          4. If you do a CFDUMP of the form scope prior to the CFINSERT, are the form fields populated?

           

          -reed

          • 2. Re: CFinsert (another route - from previous post)
            HappyHour-SC Level 1

            It's an Access db.  The table has lastname,firstname as fields.  So when I do the insert, all the other data from the "form" salesdate, totalsale, clientID is all inserted... except lastname,firstname from the query of the 2nd table.

             

            I am going to try what you posted eariler about query of TWO tables at the same time.  That is really what I want but I was trying to take another route.