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

Too many open tables?

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

    Too many open tables?

    I have four tables in a set that require interaction.
    Rather than transfer table data into and out of variables to complete the interaction; I would rather just leave the tables open in enter or change mode and then (as far as I know) all of the fields in ALL of the tables are accessible and can be 'read' into other table fields...
    What I have in mind is approx this:
    open tbl1 (enter mode) the appt table
    open tbl2 (enter mode) the transaction table
    transfer global variable data into each table
    ----- approx 14 variables used in making appts
    transfer record id #'s between the two tables
    :::
    open tbl3 (change mode) the customer table w/embedded
    ----- browse
    open tbl4 (change mode) the schedule table-one rec for
    ----- each day
    transfer data from the global variables, and field values from the first two tables into the last two tables...
    close all tables..

    My question is: Am I asking for trouble with all of the tables open at the same time???
    Is there a reasonably good chance all will transpire with NO problems????

    All of the above assumes that there are no 'coding' errors or problems..

    Comments please...
    D


    #2
    RE: Too many open tables?

    Go for it. I do this and more in XBasic. With careful coding, some error handling, you can do what you propose without difficulty.

    - Steve
    -Steve
    sigpic

    Comment


      #3
      RE: Too many open tables?

      Richard, having them open at the same time does not bother me. Having several in CHANGE or ENTER mode at the same time is ok, too, provided you're doing all the data entry work through the script. I would not feel comfortable stopping the sequence in mid-stream to collect further inputs from the user. -- t

      Comment


        #4
        RE: Too many open tables?

        You both stressed points that I was not completely sure would be 'safe' HOWEVER
        the following works just fine with no errors or mistakes (to date)...
        Admittedly, I have yet one more table to 'update' and it will require accessing records between two dates; but I think that, since I got this far with no problems, the rest should be 'downhill'.
        Thanx for the comments
        D

        It's not short, but have a look if you want...

        dim tblappt as p
        dim tbltx as p
        dim tblsked as p
        dim tblcus as p

        tblappt=table.open("b_appointments")
        tbltx=table.open("d_transactions")
        tblsked=table.open("b_schedule")
        tblcus=table.open("c_customers")

        tblappt.enter_begin() 'enter new record and get appt_id_num
        tblappt.appt_cus_id=vc_cusid
        tblappt.Appt_tx_type_num=vn_appttypenum
        tbltx.enter_begin() 'enter new record and get tx_id_number
        tbltx.tx_cus_id=vc_cusid
        tblappt.appt_tx_number=tbltx.tx_id_number 'pass tx_id_number to appt table
        tblappt.appt_date=vd_appt_is
        tblappt.Appt_date_end=vd_appt_is
        tbltx.Tx_start_date=vd_appt_is
        tbltx.Tx_end_date=vd_appt_is
        tbltx.Tx_appt_number=tblappt.Appt_id_num
        if vn_appttypenum " 2 then 'if the appt type is one of the four boarding types 3,4,5,6 -- 1 groom, 2 bath
        tblappt.Appt_date_end=vd_end_board
        tbltx.Tx_end_date=vd_end_board
        end if
        'tblcus.fetch_find() by tblcus.cus_id = vc_cus_id
        dim indx_1 as P
        indx_1 = tblcus.index_primary_put("cus_id")
        tblcus.fetch_find(vc_cusid)

        dim vdlst_appt as d
        dim vd2lst_appt as d
        dim vnnxt_appt_num as n
        dim vnlst_type_appt_num as n
        dim vn2lst_type_appt_num as n
        dim vclst_tx_num as c
        tblcus.change_begin()

        vdlst_appt=tblcus.Cus_next_appt
        vd2lst_appt=tblcus.Cus_last_appt
        vnlst_appt_num=tblcus.Cus_type_nextappt_num
        vn2lst_appt_num=tblcus.Cus_type_lastappt_num
        vclst_tx_num=tblcus.Cus_open_tx_number
        tblcus.Cus_next_appt=vd_appt_is
        tblcus.Cus_last_appt=vdlst_appt
        tblcus.Cus_2nd_last_appt=vd2lst_appt
        tblcus.Cus_type_nextappt_num=vn_appttypenum
        tblcus.Cus_type_lastappt_num=vnlst_appt_num
        tblcus.Cus_type_2lstappt_num=vn2lst_type_appt_num
        tblcus.Cus_open_tx_number=tbltx.Tx_id_number
        tblcus.Cus_nxt_appt_num=tblappt.Appt_id_num
        tblcus.Cus_last_tx_number=vclst_tx_num

        'tblsked.fetch_find() by tblsked.sched_date = vd_appt_is
        'add workload #s to sked table, add board loading to sked table
        tblsked.change_begin()

        tblsked.change_end()
        tblcus.change_end()
        tbltx.enter_end()
        tblappt.enter_end()

        ' if vn_appttypenum " 2
        ' tblsked.change_begin()
        ' tblsked.fetch_find()
        ' else if vn_appttypenum " 3
        ' endif
        ui_msg_box("","waiting to close tables")
        'close all tables here
        tblcus.close()
        tblsked.close()
        tbltx.close()
        tblappt.close()

        ui_msg_box("End","Made it to the end!")

        end

        error_handler:
        err = error_code_get()

        Comment


          #5
          RE: Too many open tables?

          The one thing that you cannot see in 'forum format' is that all of the table commands are 'nested' so I can keep track of who is doing what to whom...
          D

          Comment


            #6
            RE: Too many open tables?

            Oh that it were all as simple!!!!!!!!!!!!

            Using calendar add-in to pick a date...
            It stops just fine and date is selected..
            I need to re-verify the date on a second 'form' but the script will not stop and wait for additional input..
            The re-verification needed requires that the form be used to 'look at' several records using normal record navigation and then choosing a date -- which may be different than the date picked on the calendar (not a coding problem). There is, of course, a cancel option.
            The script just wanders on, and data is not picked up....
            Unless there is some way to 'pause' a script and wait for a specific input to continue, I'm in trouble...

            Can you pause a script in the fashion I need?????
            Looked at modeless dlg boxes, but can't see how they will pause the script...

            I think I have a work-around if the above is not possible, but I'm gonna have to bend some rules to get it done....

            D

            Comment


              #7
              RE: Too many open tables?

              Why do I always think of 'an answer' AFTER I post...??
              Just remembered wait_until()....
              May be just what I need.
              Hopefully I can make it work..
              D

              Comment


                #8
                RE: Too many open tables?

                wait_until() was more of a problem than a cure...
                I researched the command and then tried to use it to hold open a form while I changed a date..
                It held the form open, but then would not resume the script when the date was changed...
                Researched the debugger... (finally) and used it around the 'wait_until()' command..
                When the debugger got to the wait command, it locked up A5 and had to use the 'three finger salute' to get out..
                After about 4 days of working on the problem, I finally did a 'workaround'...
                I put an if clause in the script that would allow ONLY other variations in the script to continue and put the final script to be run on a button on the form..
                When the form is displayed, there are only 2 ways to get off the form: OK the date change, or cancel the appt...

                This reply is only to inform 'the guys' that there seems to be a 'kinda problem' with wait_until() and the debugger..

                I really do appreciate all the help, even tho I get to be a large pitb sometimes..
                thanx again
                D

                Comment


                  #9
                  RE: Too many open tables?

                  There is more than one problem with using wait_until - use it prior to an ftp upload command and the ftp only works every second time (go figure) - I was told by Alpha to use a different method rather than using wait_until.

                  I have also found that the debugger freezes the program and did report this as a bug a few days ago - no word yet as to whether they could replicate it. In my example, I found that quite often if you have a modal form and put debug in onsave record event code then the debugger will freeze the a5 program - just to make it interesting - it of course does not always do it..

                  Regards,
                  Scott

                  Comment

                  Working...
                  X