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

I need a piece of XBASIC to...

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

    I need a piece of XBASIC to...

    I have a need to read a file, access another file increment a number, and finally, update the PARENT file. That's it !

    Here's a logic stream:

    1. read CHILD record
    2. use code COUNTY number to access the PARENT file
    3. INCREMENT the parent record
    4. update the PARENT record
    5. assign the new COUNTY value to the CHILD record

    Can anyone put this short example in play for me ???

    Thanks,

    Lar






    #2
    need more specifics, but it looks like this can be easily accomplished using xbasic and sql.
    Gregg
    https://paiza.io is a great site to test and share sql code

    Comment


      #3
      If anyone has a location for an example or any other help, I would appreciate the location. I have the rest of the day to come up with a solution. Thanks, Lar

      Comment


        #4
        There are many ways to skin a cat, even if the cat doesn't like any of them.
        With that in mind, give us an idea of how you're planning to implement this process.
        Gregg
        https://paiza.io is a great site to test and share sql code

        Comment


          #5
          So, I have 2 files, PARENT and CHILD.

          I need to read some data from the child, (COUNTY CODE), go to the PARENT FILE (COUNTY), retrieve the next available customer number from the COUNTY file, increment that value and then update the CUSTOMER#, and assign that new customer # field to the CHILD. Does that make sense ? But, I do not know how to write the XBASIC.

          Here's the previous day's explanation from a day or so ago.

          So, ANY help in getting the code written, will be greatly appreciated !


          I have a need to read a file, access another file increment a number, and finally, update the PARENT file. That's it !

          Here's a logic stream:

          1. read CHILD record
          2. use code COUNTY number to access the PARENT file
          3. INCREMENT the parent record
          4. update the PARENT record
          5. assign the new COUNTY value to the CHILD record

          Can anyone put this short example in play for me ???

          Thanks,

          Lar

          Comment


            #6
            Lar,
            Can you provide sample files with sanitized data?
            How big are the files in question ?
            Gregg
            https://paiza.io is a great site to test and share sql code

            Comment


              #7
              Did you receive my databse from early this morning ?

              Lar

              Comment


                #8
                So, I built a database, pretty small, that a few of my colleagues are working on for me but, thought I would post here as well. The idea, or target, is to meet the TARGET value in the INSMAS file.

                Good luck !

                Attached Files

                Comment


                  #9
                  Lar,

                  I did not receive your db via email this morning.
                  I've downloaded this zip file, but I don't have the time
                  to dig into it right now.
                  Gregg
                  https://paiza.io is a great site to test and share sql code

                  Comment


                    #10
                    Lar,
                    What you provided in your example does not fit what you have written as a requested sequence.

                    1."I have 2 files, PARENT and CHILD."
                    I do not see a parent-child set present in your example
                    2. "I need to read some data from the child, (COUNTY CODE), go to the PARENT FILE (COUNTY)"
                    There exists a table ( not file ) COUNTY but there is not a table COUNTY CODE and there isn't a field in any of the tables being COUNTY CODE
                    3. "INCREMENT the parent record"
                    The table COUNTY has field 'County' with values 02,17,19. What exactly would "INCREMENT the parent record" be?

                    Sorry, but I can't help with what you've provided.
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                      #11
                      Mike,

                      You are correct. I did clone a previous post and was trying a different approach. I apologize but, I'm frustrated.

                      Here is what I am trying to accomplish:

                      Here's the previous day's explanation from a day or so ago.

                      So, ANY help in getting the code written, will be greatly appreciated !

                      1. read CHILD record
                      2. use code COUNTY number to access the PARENT file
                      3. INCREMENT the parent record
                      4. update the PARENT record
                      5. assign the new COUNTY value to the CHILD record

                      That's the whole thing. Let me know if you have any thoughts.

                      (and, it's LAR, or LARRY)

                      Can anyone put this short example in play for me ???

                      Thanks,​

                      Comment


                        #12
                        Mike. here's the database

                        Attached Files

                        Comment


                          #13
                          Okay LAR,
                          You clearly did not read what I wrote and comprehend what I wrote because you provided again, exactly the same explanation that didn't work before, and sent the exact same example datadase that doesn't have a "child" table named County Code or any field named County Code, and gave no explanation for what you perceive the concept of "incrementing" the parent record to be.

                          Be exacting, precise, complete, and thorough, NOT generalities and concepts - i.e. NOT "Parent" but the name of the table - NOT "Child" but the name of the table - the EXACT field name in the table being handled, and what EXACTLY your definition of "incrementing" is for you, and you will be able to get meaningful help. This is not that.

                          Mike W
                          __________________________
                          "I rebel in at least small things to express to the world that I have not completely surrendered"

                          Comment


                            #14
                            Hello Larry ,

                            Is it what you want to do?
                            click to open "open revised file" from the Menu.
                            INSMAS3.zip

                            Comment


                              #15
                              John,

                              Thank you for your reply. I am running out of ideas, time, and patience...

                              So, I saw what you are doing and it's close, but not quite what I need.

                              I have a file called COUNTY. This file contains all of WV counties. Each of these COUNTies, has a NEXT SEQUENCE #., for the next member to be assigned, within that county.

                              I am provided a weekly file, that contains a field for NEW MEMBER field, (called the NEW MEMBER FILE), in each record. I need a way to:

                              1. retrieve a record from the NEW MEMBER FILE, read the COUNTY field,
                              2. and using the COUNTY code just located from the NEW MEMBER FILE,
                              3. for that COUNTY record, containing the NEXT SEQUENCE # field,,
                              3. increment THAT field for THAT COUNTY, and update the NEXT SEQUENCE # field
                              4. assign that NEW MEMBER #, from the COUNTY file, to the NEW MEMBER # in the NEW MEMBER FILE
                              5. move on to the next record, if one exists

                              So, here's an example...

                              1. retrieve a record from the NEW MEMBER FILE, using COUNTY 02 - BARBOUR, read the COUNTY field,
                              2. and using the COUNTY code (02) just located from the NEW MEMBER FILE,
                              3. for that COUNTY record, containing the NEXT SEQUENCE # field (which is 101),
                              3. increment THAT field for THAT COUNTY, (which will be 102), and update the NEXT SEQUENCE # field
                              4. assign that NEW MEMBER #, from the NEW MEMBER # (which is now 102) in the NEW MEMBER FILE
                              5. move on to the next record, if one exists

                              Get the next NEW MEMBER RECORD, if one exists. One does...

                              1. retrieve a record from the NEW MEMBER FILE, using COUNTY 17 - HARRISON, read the COUNTY field,
                              2. and using the COUNTY code (17) just located from the NEW MEMBER FILE,
                              3. for that COUNTY record, containing the NEXT SEQUENCE # field (which is 201),
                              3. increment THAT field for THAT COUNTY, (which will be 202), and update the NEXT SEQUENCE # field
                              4. assign that NEW MEMBER #, from the NEW MEMBER # (which is now 202) in the NEW MEMBER FILE
                              5. move on to the next record, if one exists
                              ​​
                              Get the next NEW MEMBER RECORD, if one exists. One does...

                              1. retrieve a record from the NEW MEMBER FILE, using COUNTY 19 - LINCOLN, read the COUNTY field,
                              2. and using the COUNTY code (19) just located from the NEW MEMBER FILE,
                              3. for that COUNTY record, containing the NEXT SEQUENCE # field (which is 507),
                              3. increment THAT field for THAT COUNTY, (which will be 508), and update the NEXT SEQUENCE # field
                              4. assign that NEW MEMBER #, from the NEW MEMBER # (which is now 508) in the NEW MEMBER FILE
                              5. move on to the next record, if one exists

                              The last record, is another BARBOUR COUNTY...

                              1. retrieve a record from the NEW MEMBER FILE, using COUNTY 02 - BARBOUR, read the COUNTY field,
                              2. and using the COUNTY code (02) just located from the NEW MEMBER FILE,
                              3. for that COUNTY record, containing the NEXT SEQUENCE # field (which is 102),
                              3. increment THAT field for THAT COUNTY, (which will be 103), and update the NEXT SEQUENCE # field
                              4. assign that NEW MEMBER #, from the NEW MEMBER # (which is now 103) in the NEW MEMBER FILE
                              5. move on to the next record, if one exists

                              and on and on...

                              This is what I need an XBASIC for, deperately...

                              Any hope ?

                              Lar

                              Comment

                              Working...
                              X