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

Prepare the app for use in network enviroment...

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

    #16
    Re: Prepare the app for use in network enviroment...

    Yes Ted I agree with you, but you know - "Customer is always right!", all other applications on Bosnian market are doing / using the same system, so I'm not inventing something but just following the path...
    Anyway, noone wants to share their own solution and I don't have my own yet. I have a problem with my app in a way that when 2 users are trying to save an invoice and they enter the same invoice number, program reports a general error, which I don't want to happen, so either I can do what I said in post #1, OR intercept an error and display my own warning message, OR just before saving procedure-check if the invoice number is already taken in the table.
    What do you think?
    www.zeljkobobic.com

    Comment


      #17
      Re: Prepare the app for use in network enviroment...

      There is a thread somewhere here where someone made a table that assigned numbers or checked numbers before a record was saved to insure against what you are saying.

      There is a deeper problem if 2 people are entering the same invoice number. They should be assigned in some way. That could be assigned outside or inside the app.
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #18
        Re: Prepare the app for use in network enviroment...

        The only way I can think of handling what you want with many users entering invoices is to;
        Have the Invoice Number set to Auto Increment. This will prevent duplicate numbers in the system when 2 people are entering data.
        If the invoice is "deleted", construct a process which removes the data, but not the number. You will now have an "empty" invoice, and this can be reused.

        So, Invoice 2001 is complete
        Invoice 2002 is cancelled and empty
        Invoice 2003 is the next number based on auto increment, but the user can open 2002 and enter data.

        If the existing systems allow for Invoice Numbers to be changed, then the number used cannot be unique nor part of the audit. In this case, the Invoice Number should not be considered important, and Customer within Record Number used instead. This would allow your users to change the Inv No at will, and you would find another link to report on - like CustNo/Date etc.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #19
          Re: Prepare the app for use in network enviroment...

          I guess I don't understand the huge problem here....use the auto-increment for the record (no network problems)....have a separate field for the Invoice number chosen by the user and when saving check that it is unique--if not give a message stating that it already has been used....then you have a developer option of whether to allow Invoice number duplication or not (or can even give the user this control ). Allowing duplication makes using the Invoice number not such a good idea for querying/reporting however. Even QuickBooks will allow this for many fields and doesn't even give a warning (which can make reporting on the data very frustrating!).

          ??maybe I missed something?
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #20
            Re: Prepare the app for use in network enviroment...

            Originally posted by Ted Giles View Post
            "So, a user maybe deleted an invoice a day ago and wants to have that number filled in the records..."
            Been this route, recipie for litigation. An invoice number once saved is part of the audit trail. Deleted Invoices are an abuse of a system. You could always apply the Invoice Number when the record is complete rather than when the record is created. That will work in a networked environment.
            Hell, I'd be a millionaire if I could fiddle invoices like that!
            Zeljko, don't get involved in enterprises which could deprive you of your liberty.
            +10

            Originally posted by Zeljko View Post
            Yes Ted I agree with you, but you know - "Customer is always right!", all other applications on Bosnian market are doing / using the same system, so I'm not inventing something but just following the path...
            Anyway, noone wants to share their own solution and I don't have my own yet. I have a problem with my app in a way that when 2 users are trying to save an invoice and they enter the same invoice number, program reports a general error, which I don't want to happen, so either I can do what I said in post #1, OR intercept an error and display my own warning message, OR just before saving procedure-check if the invoice number is already taken in the table.
            What do you think?
            Actually, I'd say "The customer always gets what he wants" but part of my job is to convince him when he's wrong. If I can't, he's free to "be right" and go with someone else. I've been known to say, "Sorry, I won't do that and here's why..." So far I've only had one customer quit and go with someone else. I'm glad he did because I didn't want the problems the were likely to occur doing it his way.

            I have had one customer who wanted basically what you are asking for (the ability to delete an invoice which might or might not get reused) but I convinced them it was a bad idea. Each invoice had to have a sequential master linking number even if that was not the number that the user saw. Then, by chance, I happened to be there when they were being audited and the auditer found some "missing" records. I reminded my customer about what we did to hide the voided invoices and how they could be reviewed. The auditer was shown what we were doing and, without even checking each one, said it was fine - he just wanted to be sure something wasn't being covered up.

            Originally posted by MikeC View Post
            I guess I don't understand the huge problem here....use the auto-increment for the record (no network problems)....have a separate field for the Invoice number chosen by the user and when saving check that it is unique--if not give a message stating that it already has been used....then you have a developer option of whether to allow Invoice number duplication or not (or can even give the user this control ). Allowing duplication makes using the Invoice number not such a good idea for querying/reporting however. Even QuickBooks will allow this for many fields and doesn't even give a warning (which can make reporting on the data very frustrating!).

            ??maybe I missed something?
            Yep. That's what I'd do. They could cancel the invoice before saving it or void it after saving it but I don't let a user delete an existing invoice - they can void it but not delete it.

            Comment


              #21
              Re: Prepare the app for use in network enviroment...

              There is one potential problem with using an auto-increment field in a network environment. It occurs when doing data entry in a form with a 1:Many child table. If two users both get "10" as the initial auto-increment value and one user saves the main record and starts adding child records, those child records can show up on the other user's screen. I'm not sure if this is still true or not but I had to deal with it in earlier versions of A5 - it's the reason I tried to find an alternate auto-increment method.

              One solution is to create the new parent record using variables or a temp table then save the results to the actual table only when the user is done and "saves" the record. Editing can still be done on the regular form but new parent records MUST be added via the separate dialog/form.

              Comment


                #22
                Re: Prepare the app for use in network enviroment...

                Originally posted by CALocklin View Post
                There is one potential problem with using an auto-increment field in a network environment. It occurs when doing data entry in a form with a 1:Many child table. If two users both get "10" as the initial auto-increment value and one user saves the main record and starts adding child records, those child records can show up on the other user's screen. I'm not sure if this is still true or not but I had to deal with it in earlier versions of A5 - it's the reason I tried to find an alternate auto-increment method.

                One solution is to create the new parent record using variables or a temp table then save the results to the actual table only when the user is done and "saves" the record. Editing can still be done on the regular form but new parent records MUST be added via the separate dialog/form.
                YES YES, finally someone who understand my problems.... My dear friend, this is exactly what happend to me also, and I was using another developing tool. Basically, tool doesn't matter so much (but ofcourse it matters) like the idea and concept of solving different issues. On my form I have two browses. One is in the upper part and the other in the lower part of a form. The upper is showing invoice number,date,customer id and name, user's name, date and time of entering the record......the lower is showing items within invoice - ItemID, Item name, tax, qty, price, tax amount, total amount per item.
                So, entering a new invoice number is solved by opening a new form (parent), and entering a new item into selected invoice is done again by opening a new form (child). To prevent adding a new items at any time, I added a button "Close invoice" which is changing a boolean field into true and then it is impossible to change/add items because the invoice is locked. Later, this can be managed only by Administrator. To avoid mixing child records, I had to use a variable from main form which is passing the value to the parent form and child form.
                This logic (template) of three forms, I have used in the whole program for each table/set where I have relations parent/child, and I don't have problems with small group of users - up to three in network (so far). My worry is the future, and maybe 20 or 50 users and 50 pc-s....what will happen? Can dbf handle that, or rather switch immediatelly to sql? What would be the difference in programming with sql instead with dbf database in Alpha, regarding commands? This is why I started this thread to hear other's opinion and experinces...
                www.zeljkobobic.com

                Comment


                  #23
                  Re: Prepare the app for use in network enviroment...

                  So what happens to the record number then CAL?
                  That doesn't get duped.
                  Not suggesting you should use RecNo because of the problems it can cause.
                  Z - have you looked at Ira's record locking discussion?
                  See our Hybrid Option here;
                  https://hybridapps.example-software.com/


                  Apologies to anyone I haven't managed to upset yet.
                  You are held in a queue and I will get to you soon.

                  Comment


                    #24
                    Re: Prepare the app for use in network enviroment...

                    Originally posted by Ted Giles View Post
                    So what happens to the record number then CAL?
                    That doesn't get duped.
                    Not suggesting you should use RecNo because of the problems it can cause.
                    Z - have you looked at Ira's record locking discussion?
                    I'm not sure what you mean by "the record number" since I never referred to using the record number. Using the record number as a linking field would be a terrible idea.

                    If you are wondering what happens to "the one potential problem" I mentioned after the users continue working, I believe that when the second user finally saves the parent record, that parent record will be given a new autoincrement number and the other user's child records will disappear. Unfortunately, most users will be so disturbed by seeing the "ghost" child records that they won't trust the program after that.

                    Disclaimer - it's been a long time since I've had to deal with this issue and I'm not certain how it works in recent versions of A5.

                    Comment


                      #25
                      Re: Prepare the app for use in network enviroment...

                      Cal - your view is still valid (and well explained)
                      As far as I can tell this can never be resolved by a database manager. Some latitude is required for some processes, like quoting, but not for others like invoicing.

                      Zeljko, Multi-user and record locking are not one or the same issue as invoice numbering
                      Even in a single user environment you must not ever allow an invoice number to go missing or duplicate for that matter.
                      How easy would it be for the cash to go missing too, or the salesman's friends get 100% discount.

                      I have never used autoincrement in the invoice header table to raise the invoice number
                      I use a unique linking id to make up the invoice, only at the point of "PRINT" issue the invoice number.
                      In Alpha i change the header to that number and the items follow.
                      If its a busy environment, consider a strategy, like lock the header temporarily while the process proceeds.
                      My solutions are specific to my design / work process so may not apply to others.

                      Comment


                        #26
                        Re: Prepare the app for use in network enviroment...

                        Cal, Record Numbers don't get duplicated, that is what I was getting at. Maybe I could have phrased the comment a bit better.
                        How does that get managed so effectively in a network environment, and why can't/doesn't the auto inc work in the same way?

                        Extending Ray's comment. Would this work - On clicking a New Record button, lock database as Exclusive until the Invoice Number field has been populated with the Auto Increment.
                        If two users fire the New Record at the same time, one will be forced to wait - say a milisec - for the process to be completed and the database to be Non-Exclusive.
                        See our Hybrid Option here;
                        https://hybridapps.example-software.com/


                        Apologies to anyone I haven't managed to upset yet.
                        You are held in a queue and I will get to you soon.

                        Comment


                          #27
                          Re: Prepare the app for use in network enviroment...

                          Hi Ted
                          That's not the problem, it wont help the situation.
                          Alpha does that millisecond lock anyway.
                          The problem is, we don't want to issue the next sequential number and the one after that, before the first has been confirmed as being accepted as used and not cancelled, deleted (or your old dog ate it).
                          To quote "Been this route, recip(i)e for litigation. An invoice number once saved is part of the audit trail. Deleted Invoices are an abuse of a system. You could always apply the Invoice Number when the record is complete rather than when the record is created."

                          Comment


                            #28
                            Re: Prepare the app for use in network enviroment...

                            Originally posted by Ray in Capetown View Post
                            Hi Ted
                            The problem is, we don't want to issue the next sequential number and the one after that, before the first has been confirmed as being accepted as used and not cancelled, deleted (or your old dog ate it).
                            Hello Good Morning
                            I have noticed in Navicat ( says <auto>)and as well as Ms Access (says <New>)that the auto increment field is NOT updated till the record is saved then the field is updated and the number magically appears. How come Alpha does not do it, to save these headaches? But when we use the same Alpha in web using MySql as backend the field is shown as <Auto> till saved. That seems better approach avoiding skipped numbers in the field or someone else seeing the child record as it is being entered.
                            Thanks for reading
                            Gandhi
                            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


                              #29
                              Re: Prepare the app for use in network enviroment...

                              Originally posted by CALocklin View Post
                              .....If you are wondering what happens to "the one potential problem" I mentioned after the users continue working, I believe that when the second user finally saves the parent record, that parent record will be given a new autoincrement number and the other user's child records will disappear. Unfortunately, most users will be so disturbed by seeing the "ghost" child records that they won't trust the program after that.
                              Could someone please point me to "Ira's record locking discussion?"

                              Also, to avoid issues like the "ghost child records" mentioned above, couldn't this solve all issues:

                              Link the parent to the child using a second field. (not the primary auto-increment field of the parent table)
                              AND: This second field (in the parent table) is set to a calculated field using a a time-date stamp & user combination such as:

                              CTIME(NOW()) + vgUserID.
                              (vgUserID would be a global variable assigned to each user at login.)


                              Seems to me that if a database is initially created using this method, many potential multi-user issues are "solved in advance."

                              NOTE: My concept as presented here applies to parent/child tables scenarios on forms where users are entering the data. (ie: an invoicing form) ~ Although code could easily be generated to also do this "behind the scenes" when large amounts of data are being manipulated without user intervention.
                              Last edited by SNusa; 01-19-2012, 01:22 PM.
                              Robert T. ~ "I enjoy manipulating data... just not my data."
                              It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                              RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                              Comment


                                #30
                                Re: Prepare the app for use in network enviroment...

                                Here is a link to Ira's record locking thoughts...(too bad not all answers only took the 60 seconds to find with a search!!! )
                                http://www.csda1.com/csda_codeutilit...#recordlocking
                                Mike
                                __________________________________________
                                It is only when we forget all our learning that we begin to know.
                                It's not what you look at that matters, it's what you see.
                                Henry David Thoreau
                                __________________________________________



                                Comment

                                Working...
                                X