5 Replies Latest reply: Jul 31, 2009 6:57 AM by zzipper7 RSS

    Problem with sample forum script?

    dKazza

      Hi all,

      I am having a problem with the "create a forum" tutorial.

      The rest of the forum works okay but when i go to post a message i fill in the form and get the following error:

      SQL error: Column 'idtop_msg' cannot be null.
      SQL error: INSERT INTO forum_message_msg (idtop_msg, idusr_msg, date_msg, subject_msg, content_msg, subscribe_msg) values (null, null, null, 'here we go again', 'lets try this one more time shall we?', 1). (SQL_ERROR)
      tNG Execution Trace - VIEW
      • tNG_insert.executeTransaction
        • STARTER.Trigger_Default_Starter
        • tNG_insert.doTransaction
          • BEFORE.Trigger_Default_FormValidation
          • tNG_insert.prepareSQL
          • tNG_insert.executeTransaction - execute sql*
          • ERROR.Trigger_Default_Insert_RollBack
      • tNG_insert.getRecordset
      • tNG_insert.getFakeRsArr
      • tNG_insert.getLocalRecordset
      • tNG_insert.getFakeRecordset
      • tNG_insert.getFakeRecordset

       

      I've been through the tutorial a few times to find where i went wrong but can't find anything.  I have also googled the problem and come up empty.  If anyone could please help with this it would be much appreciated.  I get that the idtop_msg isn't getting a value on the post message page but can't understand why not.

      Thanks,

      MsKazza

        • 1. Re: Problem with sample forum script?
          dKazza Community Member

          If someone could please help me with this, it's the last thing i have to do on the site before it goes live.  I know others have come across this but i haven't been able to find a solution so far, please.

          Thanks,

          MsKazza

          • 2. Re: Problem with sample forum script?
            DwFAQ Community Member

            Where's the create forum tutorial you are mentioning? It might help others help you if they knew the steps you've taken to get where you're at...

            • 3. Re: Problem with sample forum script?
              dKazza Community Member

              Yes sorry, opps.  It used to be on the Macromedia website but the one i am now following is the link below. The tutorial is split into various sections but the part i assume the problem is is posting messages, which is the link below.

              Thanks,

              MsKazza

               

              http://www.adobetutorialz.com/articles/668/1/Building-a-Forum-with-Dreamweaver-%96-Part-3% 3A-Posting-Messages

              • 4. Re: Problem with sample forum script?
                dKazza Community Member

                Please can someone help me with this.  Surely others have had this problem in the past and someone must have managed to fix it.

                Please

                • 5. Re: Problem with sample forum script?
                  zzipper7

                   

                  This may be too simple of an answer but here are the first things to check:

                  -

                  The error is telling you that the idtop_msg is NULL or empty.

                  -

                  Without reading the tutorial, the deal is only one of a few things. Either you didn’t set the database to auto increment that column (creating its own id)

                  Or you were supposed to have carried that id  from the database to an hidden field, or URL or a field on a previous page… or somewhere that it could be referenced again. When you POST that Id is not present somwhere on  your page and  so it gets a NULL value.

                  -

                  If all of that is right and you know the id is present on the page...then you need to check your insert/update configuration, you may have one of the SQL varibles marked incorrectly   or one of those sneaky cut aand paste feilds renamed itself to  xxx2  ...grrr. 

                  -

                  There’s nothing majorly complicated in that tutorial so I think you’ll find that if you track back your steps, you’ll see that id is not being carried from one of the three placed I mentioned.

                  -

                  I hope this helps.

                  -

                  Cheers- Good luck.