3 Replies Latest reply: Feb 16, 2013 6:50 AM by Ben Pleysier RSS

    post method on the form

    iccsi Community Member

      I set my form methos to post. I would like to know does ColdFusion is smart enough to know to insert or update physical database.

      If record exists then ColdFusion server knows to update, if not then ColdFusion insert a record.

      If not, should I have one form for Edit and one form for insert to same table?

      If not, any solution for this?

      Do I need check myself does record exist, if yes run SQL to update, or if not then inser record?

       

      Your help and information is great appreciated,

       

      Regards,

       

      Iccsi,

        • 1. Re: post method on the form
          Ben Pleysier MVP

          Iwould strongly suggest you check out cfwheels. Read the documentation, it's built for doing such crud applications and has an amazing set of features and will save you a lot of time.

          • 2. Re: post method on the form
            iccsi Community Member

            Thanks for the message and help,

            It is a framework for a web site.

             

            Do you know which module has edit and insert on the same page?

            I just noticed that I need to have insert and edit on the different on the form.

            I would like to have user to use one form to insert or edit depends on record exists or not.

            I tried to place an insert record on the form which works, but I am unable to have update record works using ColdFusion.

            Your help and information is great appreciated,

             

            regards,

             

            Iccsi

            • 3. Re: post method on the form
              Ben Pleysier MVP

              In principle you could use the same form for insert and update, although I usually use two forms.

               

              You will need to find out whether a record exists and use that value to when applying the SQL, update or insert.

               

              My knowledge of CF goes back more than ten years, and I would be of no use to you. I think it best if you go to a forum that covers CF