Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Can't Force Auto-Incement Field Back to Normal Order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't Force Auto-Incement Field Back to Normal Order

    I have a simple table that has an auto-increment field. That field uses a series that started with "L00000" and (of course) adds +1 for each new record. It's been working fine for several years, but just a few days ago, somehow the word "WARRAN" got into that field, and it started incrementing from that word upward. (WARRAO, WARRAP, etc.)

    I turned off the auto-increment feature temporarily and manually inputted the correct "LXXXXX" series numbers to get the table back on track, but now every time I turn auto-increment back on, it starts the next record with "WARRAO" again, despite the fact that there are no records with anything resembling that in the table, and the last entered record has a value of "L15783."

    Any idea how to force the next record to start at L15784 like it is supposed to??

    SP32-20131103-003001.jpg
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

    #2
    Re: Can't Force Auto-Incement Field Back to Normal Order

    hello


    possible 1> can you edit the field in excel to give you the proper data and check back in alpha, test if it succeeds. if that does not work
    possible 2> can you try creating another field, say id2 character length 6. keep it user entered. and then edit this table in excel and assign the values you want, excel will increment to the end L00001 to whatever the end number is. then save and open in alpha convert that field to auto increment and delete the old unsequenced original id?

    and if successful and in order for someone not to mess with that don't show that field anywhere when data entry is in progress.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


      #3
      Re: Can't Force Auto-Incement Field Back to Normal Order

      I just tried one step seems to work without all those excel stuff I suggested.
      duplicate the original table to a new one copy all records. then correct the sequence then make it auto increment. it worked.
      thanks for reading

      gandhi

      version 11 3381 - 4096
      mysql backend
      http://www.alphawebprogramming.blogspot.com
      [email protected]
      Skype:[email protected]
      1 914 924 5171

      Comment


        #4
        Re: Can't Force Auto-Incement Field Back to Normal Order

        Rich

        You need to either change the value of the record(s) with WARRAN in it (and it's variations), or delete the WARRAN entry(s) and then pack the table.
        Al Buchholz
        Bookwood Systems, LTD
        Weekly QReportBuilder Webinars Thursday 1 pm CST

        Occam's Razor - KISS
        Normalize till it hurts - De-normalize till it works.
        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
        When we triage a problem it is much easier to read sample systems than to read a mind.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #5
          Re: Can't Force Auto-Incement Field Back to Normal Order

          one more thing that works ( even simpler )

          change the current table field rule to user entered and change all the wrong sequence to desired ones and add one more record using old desired sequence numbering before changing back to auto increment.
          it seems to fix the sequence to original.
          somehow alpha remembers the last entered auto increment value and add one to it, so by adding one more record in the correct sequence you are forcing alpha to remember the new correct one.
          Last edited by GGandhi; 11-03-2013, 07:38 PM.
          thanks for reading

          gandhi

          version 11 3381 - 4096
          mysql backend
          http://www.alphawebprogramming.blogspot.com
          [email protected]
          Skype:[email protected]
          1 914 924 5171

          Comment


            #6
            Re: Can't Force Auto-Incement Field Back to Normal Order

            Originally posted by GGandhi View Post
            one more thing that works ( even simpler )

            change the current table field rule to user entered and change all the wrong sequence to desired ones and add one more record using old desired sequence numbering before changing back to auto increment.
            it seems to fix the sequence to original.
            somehow alpha remembers the last entered auto increment value and add one to it, so by adding one more record in the correct sequence you are forcing alpha to remember the new correct one.
            That is incorrect. Alpha looks at the max value and increments. Previous versions worked differently.
            Last edited by Al Buchholz; 11-03-2013, 10:13 PM.
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              Re: Can't Force Auto-Incement Field Back to Normal Order

              That is incorrect. Alpha looks at the max value and increments. Previous versions worked differently.
              of course you probably know why this happens then..

              I turned off the auto-increment feature temporarily and manually inputted the correct "LXXXXX" series numbers to get the table back on track, but now every time I turn auto-increment back on, it starts the next record with "WARRAO" again, despite the fact that there are no records with anything resembling that in the table, and the last entered record has a value of "L15783."
              if alpha just looks at the max value why this happens or why would any one need to remove all the references to warren and the like of, and then pack the table?

              i am just curious, not doubting you.
              thanks for reading

              gandhi

              version 11 3381 - 4096
              mysql backend
              http://www.alphawebprogramming.blogspot.com
              [email protected]
              Skype:[email protected]
              1 914 924 5171

              Comment


                #8
                Re: Can't Force Auto-Incement Field Back to Normal Order

                Originally posted by GGandhi View Post
                of course you probably know why this happens then..
                This means what?
                Originally posted by GGandhi View Post
                if alpha just looks at the max value why this happens or why would any one need to remove all the references to warren and the like of, and then pack the table?

                i am just curious, not doubting you.
                Alpha looks at the max value for the field in all records whether they are deleted or not.

                It is possible to 'undelete' records. The pack permanently removes deleted records from the table, so they are no longer evaluated.

                Pack also clears up additional issues and should be considered when unexpected results are occurring.
                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #9
                  Re: Can't Force Auto-Incement Field Back to Normal Order

                  I turned off the auto-increment feature temporarily and manually inputted the correct "LXXXXX" series numbers to get the table back on track, but now every time I turn auto-increment back on, it starts the next record with "WARRAO" again, despite the fact that there are no records with anything resembling that in the table, and the last entered record has a value of "L15783."
                  I quoted rich's statement, I was asking you why that happened, if alpha just looks at the max value. as he stated the last record was L15783. then alpha should just go to the next value. it did not do that. with my suggestion I was able to go to next high value when I added one more record and sequence was back on line. no deletion no packing done to the table.
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #10
                    Re: Can't Force Auto-Incement Field Back to Normal Order

                    Originally posted by GGandhi View Post
                    I quoted rich's statement, I was asking you why that happened, if alpha just looks at the max value. as he stated the last record was L15783. then alpha should just go to the next value. it did not do that. with my suggestion I was able to go to next high value when I added one more record and sequence was back on line. no deletion no packing done to the table.
                    The max value is not the last value in the table it's the largest value in the table no matter where it is located.

                    Your suggestion included this...

                    change all the wrong sequence to desired ones

                    Then the record that you added to the end is the max value. It has nothing to do with the physical location of the record in the table.
                    You could change any record to the value that you want autoincrement to increment from and if it is the max value found in the table, then the next autotincrement will be max+1
                    Al Buchholz
                    Bookwood Systems, LTD
                    Weekly QReportBuilder Webinars Thursday 1 pm CST

                    Occam's Razor - KISS
                    Normalize till it hurts - De-normalize till it works.
                    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                    When we triage a problem it is much easier to read sample systems than to read a mind.
                    "Make it as simple as possible, but not simpler."
                    Albert Einstein

                    http://www.iadn.com/images/media/iadn_member.png

                    Comment


                      #11
                      Re: Can't Force Auto-Incement Field Back to Normal Order

                      Thanks everyone for the suggestions. I can confirm what Al said, that the table does in fact always look at the "max" value, which is why just changing all the bad records to the correct "L-series" numbers didn't force the table to start with the correct sequence, as it still had the highest "WARRXX" value stuck in its head, and packing the table probably would have fixed that. (I always forget about packing the table!)

                      Anyway, before I got a chance to see Al's post about deleting and packing the table, I got it fixed by copying the table to a new table with the auto-increment turned off on that field, deleted the bad records, then appended the "WARRXX" records to the new table without any Linkingkeys entered. Then I manually entered the correct sequential Linkingkey values, turned auto-increment back on, and the next new record in this new table sequenced correctly.

                      I then re-named the new table with same name as the original (after deleting the original), and everything is working correctly.

                      I'm sure Al's method would have accomplished the same thing without having to create a new table, so I will certainly remember that for next time!
                      Last edited by Rich Hartnett; 11-06-2013, 12:43 PM.
                      Sergeant Richard Hartnett
                      Hyattsville City Police Department
                      Maryland

                      Comment

                      Working...
                      X