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

Trouble Shoot Script

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

    Trouble Shoot Script

    I need help in troubleshooting the attached Script I use to archive. The script works fine when run locally, but CRASHES when run over a network. The append goes fine, but between the Delete Function and Message that you will be returned to the main menu, it crashes. Sometimes the HALT Script will show itself - suggesting it hasn't ended.

    I don't have a network at home, so I'm at a loss to figure out how to network test it? Suggestions?

    Here is the script:
    ---------------------------------------
    ''XBasic
    Parent.commit()

    :Form.view("Blank")
    ':Ser_Prov_Edit.close() 'Left Open so Archive/Append Runs Faster? Button to run on this form.

    on error goto errors

    '** This functions will append records to Archive

    function ArchiveSP as C() 'Use function so Append occurs before Delete
    ' Append records to archive

    a_tbl = Table.open("Ser_ARC.dbf")
    append.t_db = "ser_prov.dbf"
    append.m_key = "POC_ID+CDATE(SPDATE)+TIME_ID"
    append.t_key = "POC_ID+CDATE(SPDATE)+TIME_ID"
    append.m_filter = ""
    append.t_filter = "Spdate Sp_Id"
    append.m_case2 = "EITHER"
    append.m_field2 = "Pte_Id"
    append.m_exp2 = "@Ser_Prov->Pte_Id"
    append.m_case3 = "EITHER"
    append.m_field3 = "Poc_Id"
    append.m_exp3 = "@Ser_Prov->Poc_Id"
    append.m_case4 = "EITHER"
    append.m_field4 = "Spdate"
    append.m_exp4 = "@Ser_Prov->Spdate"
    append.m_case5 = "EITHER"
    append.m_field5 = "Shift"
    append.m_exp5 = "@Ser_Prov->Shift"
    append.m_case6 = "EITHER"
    append.m_field6 = "Time"
    append.m_exp6 = "@Ser_Prov->Time"
    append.m_case7 = "EITHER"
    append.m_field7 = "Category"
    append.m_exp7 = "@Ser_Prov->Category"
    append.m_case8 = "EITHER"
    append.m_field8 = "Units"
    append.m_exp8 = "@Ser_Prov->Units"
    append.m_case9 = "EITHER"
    append.m_field9 = "Cost_Unit"
    append.m_exp9 = "@Ser_Prov->Cost_Unit"
    append.m_case10 = "EITHER"
    append.m_field10 = "Client"
    append.m_exp10 = "@Ser_Prov->Client"
    append.m_case11 = "EITHER"
    append.m_field11 = "Length"
    append.m_exp11 = "@Ser_Prov->Length"
    append.m_case12 = "EITHER"
    append.m_field12 = "Charges"
    append.m_exp12 = "@Ser_Prov->Charges"
    append.m_case13 = "EITHER"
    append.m_field13 = "Payor"
    append.m_exp13 = "@Ser_Prov->Payor"
    append.m_case14 = "EITHER"
    append.m_field14 = "Unit_Desc"
    append.m_exp14 = "@Ser_Prov->Unit_Desc"
    append.m_case15 = "EITHER"
    append.m_field15 = "Time_Id"
    append.m_exp15 = "@Ser_Prov->Time_Id"
    append.m_case16 = "EITHER"
    append.m_field16 = "Program"
    append.m_exp16 = "@Ser_Prov->Program"
    append.m_case17 = "EITHER"
    append.m_field17 = "Payorid"
    append.m_exp17 = "@Ser_Prov->Payorid"
    append.m_case18 = "EITHER"
    append.m_field18 = "a_Length"
    append.m_exp18 = "@Ser_Prov->a_Length"
    append.t_count = 0
    a_tbl.append()
    a_tbl.close()

    Dim global MyAppend as c
    MyAppend = "Y"

    end function

    ArchiveSP () 'This is where the above function is called

    ui_msg_box("","Archive complete, OK to finish.")

    function ArchiveSP1 as C() 'Defines the delete function

    '*****Insert sp_ARC_Del code here
    tbl = table.open("Ser_Prov.dbf")
    query.filter = "Spdate "Y"
    ui_msg_box("Error Occured","Append operation failed.")
    'END
    END IF

    vReturn = MyDelete
    IF vReturn "Y"
    ui_msg_box("Error Occured","Delete operation failed.")
    'END
    END IF

    ui_msg_box("","Process Complete - you will now be returned to the main menu.",0+64)
    'Form.show("Ser_Prov_edit")

    if is_object("Al_Main_Menu") then
    Al_Main_Menu.show()
    Al_Main_Menu.activate()
    else
    :Form.view("Al_Main_Menu")
    end if

    :blank.close()
    Parentform.close()
    'sys_send_keys("{%B}{P}")
    END

    errors:
    err_msg = error_text_get(error_code_get())
    line = error_line_number_get()
    script = error_script_get()
    ui_msg_box("Error", err_msg+" Error occurred at line "+alltrim(str(line,4,0))+ " in script: "+script)
    end
    ---------------------------------------------
    Script END

    As you see I've tried to catch where the problem is, but I never get a message, only a crash.

    Thanks for your help.

    Tom

    #2
    RE: Trouble Shoot Script

    Tom

    Therer doesn't seem to be anything obvious, but it very well could be a timing problem, particulary if the code works when pulling the data directly off the server, but not when going across a network.

    The main problem with using a function is that an error in the function may just cause the function to stop and not give an error. One testing option would be to replace the reference to the function in a script with the actual code for the append. If this still gives trouble, you could use debug() to "walk" through the code and see where the problem occurs. If it is a timing issue, then it may still work ok with debug, but fail in actual use.

    Jerry

    Comment


      #3
      RE: Trouble Shoot Script

      Jerry,

      Thanks for taking a look. I plan to show up tomorrow with a number of options to try. I'll be sure to try it without the function calls.

      Tom

      Comment


        #4
        RE: Trouble Shoot Script

        Tom, you're probably going to do this anyway, but if it were me, I'd break the script down into separate scripts, and run each from its own button... This may help pinpoint the problem area, or confirm that it's a timing problem (if they run ok separately).

        -- tom

        Comment


          #5
          RE: Trouble Shoot Script

          Thanks Tom - I'll do that.

          I've been struggling with this for some time now. I also plan to create scripts fresh on the operations tab and try running them by calling them each separately (one to append, the next to delete.) The append seems to work, it's the delete were the problem is - or the way they transition.

          The table I am deleting records from, is the table (form) on which this button resides - any problem here? or not opening it EXCLUSIVE?

          Thanks again,

          Tom

          Comment

          Working...
          X