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

Operations - Post

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

    Operations - Post

    Hi Guys, I have a 8 operations that post results from sporting matches into an existing table. When I run these operations from the control panel, everything works just fine, but when I try to run them from a button on a Form, I get the error message "Error running Post Operation, no such table".
    I do need to somehow run these 8 operations from the form as I have the 8 corresponding records displaying the related matches every 20 seconds, and I need to update them by running these operations using the On Timer.
    I want to run each operations simultaneously as each record is displayed also using the On Timer without having to close the form and run the operations from the control panel..

    Any ideas chaps ?

    Thank you

    #2
    Re: Operations - Post

    Attach a sample for analysis?

    Show the xbasic behind the operations?

    Hoping you mean sequentially rather than simultaneously.
    There can be only one.

    Comment


      #3
      Re: Operations - Post

      If you need to run the operations one right after the other I'd wrap each in its own user defined function to prevent one from trying to start while others are still working.

      Comment


        #4
        Re: Operations - Post

        a_tbl = table.open("groups")
        ON ERROR GOTO ERROR23122013133922241


        post.t_db = ""+chr(92)+chr(92)+"LAPTOP5\Laptop\groups.DBF"
        post.m_key = "str(TABLE1,5,0)"
        post.t_key = "str(TABLE1,5,0)"
        post.m_filter = ""
        post.t_filter = ""
        post.m_count = 60
        post.m_field1 = "M1P1S1"
        post.m_exp1 = "if(TABLE1=2,@GROUPS->M1p1s1,M1P1S1)"
        post.m_field2 = "M1P1S2"
        post.m_exp2 = "if(TABLE1=2,@GROUPS->M1p1s2,M1P1S2)"
        post.m_field3 = "M1P1S3"
        post.m_exp3 = "if(TABLE1=2,@GROUPS->M1p1s3,M1P1S3)"
        post.m_field4 = "M1P8S1"
        post.m_exp4 = "if(TABLE1=2,@GROUPS->M1p8s1,M1P8S1)"
        post.m_field5 = "M1P8S2"
        post.m_exp5 = "if(TABLE1=2,@GROUPS->M1p8s2,M1P8S2)"
        post.m_field6 = "M1P8S3"
        post.m_exp6 = "if(TABLE1=2,@GROUPS->M1p8s3,M1P8S3)"
        post.m_field7 = "M2P4S1"
        post.m_exp7 = "if(TABLE1=2,@GROUPS->M2p4s1,M2P4S1)"
        post.m_field8 = "M2P4S2"
        post.m_exp8 = "if(TABLE1=2,@GROUPS->M2p4s2,M2P4S2)"
        post.m_field9 = "M2P4S3"
        post.m_exp9 = "if(TABLE1=2,@GROUPS->M2p4s3,M2P4S3)"
        post.m_field10 = "M2P5S1"
        post.m_exp10 = "if(TABLE1=2,@GROUPS->M2p5s1,M2P5S1)"
        post.m_field11 = "M2P5S2"
        post.m_exp11 = "if(TABLE1=2,@GROUPS->M2p5s2,M2P5S2)"
        post.m_field12 = "M2P5S3"
        post.m_exp12 = "if(TABLE1=2,@GROUPS->M2p5s3,M2P5S3)"
        post.m_field13 = "M3P3S1"
        post.m_exp13 = "if(TABLE1=2,@GROUPS->M3p3s1,M3P3S1)"
        post.m_field14 = "M3P3S2"
        post.m_exp14 = "if(TABLE1=2,@GROUPS->M3p3s2,M3P3S2)"
        post.m_field15 = "M3P3S3"
        post.m_exp15 = "if(TABLE1=2,@GROUPS->M3p3s3,M3P3S3)"
        post.m_field16 = "M3P6S1"
        post.m_exp16 = "if(TABLE1=2,@GROUPS->M3p6s1,M3P6S1)"
        post.m_field17 = "M3P6S2"
        post.m_exp17 = "if(TABLE1=2,@GROUPS->M3p6s2,M3P6S2)"
        post.m_field18 = "M3P6S3"
        post.m_exp18 = "if(TABLE1=2,@GROUPS->M3p6s3,M3P6S3)"
        post.m_field19 = "M4P2S1"
        post.m_exp19 = "if(TABLE1=2,@GROUPS->M4p2s1,M4P2S1)"
        post.m_field20 = "M4P2S2"
        post.m_exp20 = "if(TABLE1=2,@GROUPS->M4p2s2,M4P2S2)"
        post.m_field21 = "M4P2S3"
        post.m_exp21 = "if(TABLE1=2,@GROUPS->M4p2s3,M4P2S3)"
        post.m_field22 = "M4P7S1"
        post.m_exp22 = "if(TABLE1=2,@GROUPS->M4p7s1,M4P7S1)"
        post.m_field23 = "M4P7S2"
        post.m_exp23 = "if(TABLE1=2,@GROUPS->M4p7s2,M4P7S2)"
        post.m_field24 = "M4P7S3"
        post.m_exp24 = "if(TABLE1=2,@GROUPS->M4p7s3,M4P7S3)"
        post.m_field25 = "M5W1S1"
        post.m_exp25 = "if(TABLE1=2,@GROUPS->M5w1s1,M5W1S1)"
        post.m_field26 = "M5W1S2"
        post.m_exp26 = "if(TABLE1=2,@GROUPS->M5w1s2,M5W1S2)"
        post.m_field27 = "M5W1S3"
        post.m_exp27 = "if(TABLE1=2,@GROUPS->M5w1s3,M5W1S3)"
        post.m_field28 = "M5W2S1"
        post.m_exp28 = "if(TABLE1=2,@GROUPS->M5w2s1,M5W2S1)"
        post.m_field29 = "M5W2S2"
        post.m_exp29 = "if(TABLE1=2,@GROUPS->M5w2s2,M5W2S2)"
        post.m_field30 = "M5W2S3"
        post.m_exp30 = "if(TABLE1=2,@GROUPS->M5w2s3,M5W2S3)"
        post.m_field31 = "M6W3S1"
        post.m_exp31 = "if(TABLE1=2,@GROUPS->M6w3s1,M6W3S1)"
        post.m_field32 = "M6W3S2"
        post.m_exp32 = "if(TABLE1=2,@GROUPS->M6w3s2,M6W3S2)"
        post.m_field33 = "M6W3S3"
        post.m_exp33 = "if(TABLE1=2,@GROUPS->M6w3s3,M6W3S3)"
        post.m_field34 = "M6W4S1"
        post.m_exp34 = "if(TABLE1=2,@GROUPS->M6w4s1,M6W4S1)"
        post.m_field35 = "M6W4S2"
        post.m_exp35 = "if(TABLE1=2,@GROUPS->M6w4s2,M6W4S2)"
        post.m_field36 = "M6W4S3"
        post.m_exp36 = "if(TABLE1=2,@GROUPS->M6w4s3,M6W4S3)"
        post.m_field37 = "M7L1S1"
        post.m_exp37 = "if(TABLE1=2,@GROUPS->M7l1s1,M7L1S1)"
        post.m_field38 = "M7L1S2"
        post.m_exp38 = "if(TABLE1=2,@GROUPS->M7l1s2,M7L1S2)"
        post.m_field39 = "M7L1S3"
        post.m_exp39 = "if(TABLE1=2,@GROUPS->M7l1s3,M7L1S3)"
        post.m_field40 = "M7L2S1"
        post.m_exp40 = "if(TABLE1=2,@GROUPS->M7l2s1,M7L2S1)"
        post.m_field41 = "M7L2S2"
        post.m_exp41 = "if(TABLE1=2,@GROUPS->M7l2s2,M7L2S2)"
        post.m_field42 = "M7L2S3"
        post.m_exp42 = "if(TABLE1=2,@GROUPS->M7l2s3,M7L2S3)"
        post.m_field43 = "M8L3S1"
        post.m_exp43 = "if(TABLE1=2,@GROUPS->M8l3s1,M8L3S1)"
        post.m_field44 = "M8L3S2"
        post.m_exp44 = "if(TABLE1=2,@GROUPS->M8l3s2,M8L3S2)"
        post.m_field45 = "M8L3S3"
        post.m_exp45 = "if(TABLE1=2,@GROUPS->M8l3s3,M8L3S3)"
        post.m_field46 = "M8L4S1"
        post.m_exp46 = "if(TABLE1=2,@GROUPS->M8l4s1,M8L4S1)"
        post.m_field47 = "M8L4S2"
        post.m_exp47 = "if(TABLE1=2,@GROUPS->M8l4s2,M8L4S2)"
        post.m_field48 = "M8L4S3"
        post.m_exp48 = "if(TABLE1=2,@GROUPS->M8l4s3,M8L4S3)"
        post.m_field49 = "M9W7S1"
        post.m_exp49 = "if(TABLE1=2,@GROUPS->M9w7s1,M9W7S1)"
        post.m_field50 = "M9W7S2"
        post.m_exp50 = "if(TABLE1=2,@GROUPS->M9w7s2,M9W7S2)"
        post.m_field51 = "M9W7S3"
        post.m_exp51 = "if(TABLE1=2,@GROUPS->M9w7s3,M9W7S3)"
        post.m_field52 = "M9L6S1"
        post.m_exp52 = "if(TABLE1=2,@GROUPS->M9l6s1,M9L6S1)"
        post.m_field53 = "M9L6S2"
        post.m_exp53 = "if(TABLE1=2,@GROUPS->M9l6s2,M9L6S2)"
        post.m_field54 = "M9L6S3"
        post.m_exp54 = "if(TABLE1=2,@GROUPS->M9l6s3,M9L6S3)"
        post.m_field55 = "M10W8S1"
        post.m_exp55 = "if(TABLE1=2,@GROUPS->M10w8s1,M10W8S1)"
        post.m_field56 = "M10W8S2"
        post.m_exp56 = "if(TABLE1=2,@GROUPS->M10w8s2,M10W8S2)"
        post.m_field57 = "M10W8S3"
        post.m_exp57 = "if(TABLE1=2,@GROUPS->M10w8s3,M10W8S3)"
        post.m_field58 = "M10L5S1"
        post.m_exp58 = "if(TABLE1=2,@GROUPS->M10l5s1,M10L5S1)"
        post.m_field59 = "M10L5S2"
        post.m_exp59 = "if(TABLE1=2,@GROUPS->M10l5s2,M10L5S2)"
        post.m_field60 = "M10L5S3"
        post.m_exp60 = "if(TABLE1=2,@GROUPS->M10l5s3,M10L5S3)"
        post.t_count = 0

        'Prompt for confirmation before running the Operation.......
        dim rec_count as n

        rec_count = a5_get_records_in_query(""+chr(92)+chr(92)+"LAPTOP5\Laptop\groups.DBF",post.t_filter,-1,.f.)


        message_text = "A maximum of "+rec_count + " record(s) will be Posted from '\\LAPTOP5\Laptop\groups.DBF' to 'groups'."+crlf(2)+ "OK to proceed?"
        operation_result=ui_msg_box("Post Operation",message_text,UI_OK_CANCEL+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
        If operation_result <> ui_ok_selected then
        end
        end if



        a_tbl.post()


        GOTO CONTINUE23122013133922241
        ERROR23122013133922241:
        ON ERROR GOTO 0
        ui_msg_box("Error","Error running Post Operation"+crlf()+error_text_get())
        END
        CONTINUE23122013133922241:
        a_tbl.close()
        'Display a dialog box showing the results of the Operation

        dim args as sql::arguments
        if eval_valid("arguments") then
        if typeof(arguments) = "P" then
        args = arguments
        end if
        end if


        a5_post_op_result(a_records_processed,a_records_total,a_records_violated,"groups", args)
        'If the Operation is run from within a Form or Browse, then refresh the window
        if is_object(topparent.this) then
        if topparent.Class() = "form" .or. topparent.class() = "browse" then
        topparent.Refresh_layout()
        end if
        end if

        Comment


          #5
          Re: Operations - Post

          Hi Tom, good to hear from you mate. Not got that far yet. Only tried running one of the operations on a button but as that failed I have not set anything up as yet. I would like to run each operation prior to the record it is updating being displayed.

          Comment


            #6
            Re: Operations - Post

            Hi Stan, yes sequentially rather than simultaneously. As you know from previous posts, I am not very good at explaining things...
            Hope the xbasic gives you some clues Mike.
            I'm only running the World Championship of Ping Pong using this program, so no pressure. haha

            Comment


              #7
              Re: Operations - Post

              Fred,

              May be a path issue.

              Are you trying to post to another machine?

              Are you trying to post from one folder to another on the same machine?

              Is the target table in the same folder as your database?

              Since both master and transaction tables have the same name, are you mistakenly trying to update records in the same table using a post op?

              Comment


                #8
                Re: Operations - Post

                Hi Tom, the Transaction table fields are identical to the Destination table fields. The data is from 8 separate Laptops via wired network and using unique Table No. ID (1-8) , the operation for each Laptop updates the Server table accordingly.
                Hope this helps.

                Comment


                  #9
                  Re: Operations - Post

                  I think you may have cracked it Tom.... I wonder if the error message is because it cannot see the transaction table ??? I will test this using a duplicate folder on the server and see if the message appears.

                  Comment


                    #10
                    Re: Operations - Post

                    Nope, still the same error.

                    Comment


                      #11
                      Re: Operations - Post

                      When I think POST I work from the transaction table, posting to the master. Are you running the op from each laptop, or from some other machine? Might you be doing this backwards? Color me confused. Stan's request for a data sample is proving him correct.

                      Comment


                        #12
                        Re: Operations - Post

                        Hi Tom, I am running the Operations on the Server (MASTER) so as to retrieve the data from the 8 Laptops (TRANSACTION).
                        As I said, when running the operations from the control panel everything works perfectly, but I need to run them from a Form on the actual server.
                        The way this works is like this:- 8 Umpires enter the scores of the matches on their scoring machines (Laptops 1 - 8), and I retrieve the latest scores via the 8 x operations that are run from the SERVER. The information is then displayed on 2 x 60" screens so spectators can see what the latest scores are on each of the 8 tables.
                        Last edited by Zradene; 12-23-2013, 02:54 PM.

                        Comment


                          #13
                          Re: Operations - Post

                          Nothing obviously wrong with the script.

                          Have you tried mapping the unc server location to a drive letter?
                          There can be only one.

                          Comment


                            #14
                            Re: Operations - Post

                            Got it guys.... needed to select the run option as SPAWN (Script run in its own session).

                            Comment


                              #15
                              Re: Operations - Post

                              Just to confirm how I got this to work.
                              I created the script below and put this on the button on my form and set the Run Option to Spawn (Script run in its own session). All this does is runs the xbasic script as above which updates my records.

                              Thank you Stan and Tom for your kind offers to help with this. I am most grateful to you both.

                              'Run a saved 'Post' operation: 'UpdateLaptop1'.
                              query.filter = ""
                              query.order = ""

                              DIM operation_name as c
                              operation_name = "UpdateLaptop1"
                              If operation_name <> "" then
                              post.run_silent(operation_name,"",query.filter)
                              End if

                              Comment

                              Working...
                              X