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

Memo fields - saving to wrong record

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

    Memo fields - saving to wrong record

    A client reported this to me, so this is second hand info. Says when they save a record (which has a memo field) that the most recent text additions to the memo field is copied to another record's memo field. Sometimes the same memo field, sometimes a different memo field. They end up with the same typed information on TWO records. They are networked with multiusers on Alpha v6 Runtimes.

    Wanted to get on the right track - has anyone experienced similar goofyness regarding memo fields? Indexing issues?

    Thanks
    Steve Wood
    See my profile on IADN


    #2
    RE: Memo fields - saving to wrong record

    Steve, I have seen similar actions but it was not necessarily linked to the memo field, it would happen with any field. I have a set that has about 6 tables. After creating and saving the record, if I go to a table within the set that is beyond a table that has no data, when I do a modify the data will be placed in the record before the record that I wanted the data to be entered. I hope this makes sense. In short I have only seen it happen with sets, not individual tables.

    Comment


      #3
      RE: Memo fields - saving to wrong record

      Steve,

      My client is experiencing the same problem in a multi-user environment. Pieces of memo fields are being concatenated to other memo fields on other records. I cannot find any pattern to it. My client is getting frustrated because they are sending orders and purchase orders out to customers and vendors with information that is not pertinent.

      Neither are we able to readily re-create the problem. It appears to be totally random. It is not limited to one user's memo fields appearing in other memo fields for the same user, but is often pieces of different users memo fields appearing in others memo fields.

      Does anyone out there have a solution to this?

      Comment


        #4
        RE: Memo fields - saving to wrong record

        I haven't seen this specific issue but I've had other issues with data on networked systems ending up in someone else's record.

        I'm not sure I've actually eliminated the problem but I'm confident that it has been greatly reduced by requiring everyone to upgrade to at least 512 RAM. Maybe more is still needed.

        I suppose another possibility is a bad LAN card.

        Cal Locklin
        www.aimsdc.net

        Comment


          #5
          RE: Memo fields - saving to wrong record

          Cal,

          All the workstations and laptops have 512K RAM. I played around with the memo_check("v",.f.) function for the table, but it comes back clean.

          I have not been compacting the database for each release. Might this have any impact on the memo fields?

          Deene

          Comment


            #6
            RE: Memo fields - saving to wrong record

            If this is a real problem, it would be good to put together some facts and present to Alpha engineers(although it looks difficult to provide something they can reproduce in the lab). Has someone already done this? I have the information second hand, and not very close to the client that has the issue - can someone else here take this to Alpha?
            Steve Wood
            See my profile on IADN

            Comment


              #7
              RE: Memo fields - saving to wrong record

              I'm not sure if this will help, but I have always had to occasionally deal with this issue sice 4.0. Each scenario is different, of course, but here's an example. I open a second form as a dialog, get entry, and when they come back it would sometimes jump to a different record. So, on the button, first I get the record number, and when they come back, if the record number of the current parent has changed, I fetch the original record number.

              Although this is less than ideal, you might try getting the current record number at the onchange event, and check the record numbers at the cansaverecord event. You would have to toy around with it.
              Cole Custom Programming - Terrell, Texas
              972 524 8714
              [email protected]

              ____________________
              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

              Comment


                #8
                RE: Memo fields - saving to wrong record

                Check out Peter Wayne's article: Memo Fields that work.

                The cardinal rule in editing/entering memos is to absolutely, positively disable navigation of the form. Dialogs should work, as does:

                form.restrict_navigation = .t.

                Even w. dialogs you MUST disable navigation one way or the other.

                But the best method IMHO is:

                vMode = parentform.mode_get()

                IF vMode = "CHANGE" .or. vMode = "ENTER"
                parentform.commit()
                END IF

                tbl = table.current()
                p.text=tbl.Memo

                vChoice = a5_memo_editor(p,"Xbasic Scripts & Tips")

                IF vChoice = "save"
                tbl.change_begin()
                tbl.Memo = p.text
                tbl.change_end(.t.)
                Memox.refresh()
                END IF

                There is a similar method for RTF memos (but more complex). If anyone is interested, let me know.

                Peter
                Peter
                AlphaBase Solutions, LLC

                [email protected]
                https://www.alphabasesolutions.com


                Comment


                  #9
                  RE: Memo fields - saving to wrong record

                  Martin,

                  I have experienced this problem, too, but it is a different problem than that of memo fields ending up with more lines of text in them than the user entered.

                  Like you, I solved the problem of the base form getting refreshed to the original record when you return from a modal form by rerunning the query. I just used:

                  topparrent.BaseQueryRun(query.filter,query.order)

                  with a new filter expression for the newly created record.

                  Comment


                    #10
                    RE: Memo fields - saving to wrong record

                    Hi everyone,

                    Let me explain the problem as it has occurred in my application.

                    The line item form in my application has many fields, including a field that is a memo field.

                    User 1 saves a line item via the detail form with a memo field that is 15 lines of text long (The memo has carriage returns so it is 15 lines and not wrapped text).

                    User 2 saves a line item with a memo field that is only 6 lines long. However, when this line item memo field is retrieved (or printed on a report) later on, it contains the original 6 lines PLUS the last 9 lines of User 1's memo field.

                    As my table only contains the date created and not the time, I cannot determine if they occurred on or about the same time of day. One scenario that I can think of is that A5 may be saving both in a close time period where the first memo field is saved and the buffer is not cleared or the buffer length is not reset when the second memo field is saved. Consequently, the remainder of the first user's memo field ends up being saved in the second user's memo field.

                    Deene

                    Comment


                      #11
                      RE: Memo fields - saving to wrong record

                      Are you using Windows XP?

                      Have you disabled opportunistic locking?

                      -- tom

                      Comment


                        #12
                        RE: Memo fields - saving to wrong record

                        Originally I used to have many problems with memo fields but not last few years since I followed Peter Wayne�s suggestion of keeping the memo field in a separate table (as a Child table) and in V4 before X-Dialog the only way the user was able to enter anything to a memo field was by clicking on a button which opened a form containing a variable where the user would enter the memo value and closing the form it would save it via X-basic to the memo table, in other the user never could open the table directly. In V5 & V6 I use an X-Dialog to do it. Since I used this technique I don�t recall any complaint�s from my clients on memo�s

                        Here is an example of the memo table and X-dialog I use for my Order Entry tables
                        Note memo�s have an option to automatically add the users (logdin) name and the user can also select on which report the memo�s should print

                        See Attached Picture

                        The memo table structure;

                        Ord_No Character 10 0
                        Ship_Memo Memo 10 0
                        Order_Memo Memo 10 0
                        Recored Logical 1 0
                        P_Sm_P Logical 1 0
                        P_Sm_I Logical 1 0
                        P_Om_P Logical 1 0
                        P_Om_I Logical 1 0
                        Norder_Memo Memo 10 0
                        Ord_No2 Character 6 0
                        Memo1 Memo 10 0
                        Memo2 Memo 10 0
                        Print_M1 Logical 1 0

                        The script;

                        'Date Created: 24-Mar-2003 02:38:49 PM
                        'Last Updated: 08-Nov-2004 10:05:46 AM
                        'Created By : Daniel Weiss
                        'Updated By : Daniel Weiss

                        msg1 = "Ez Link Was Unable To Retrieve The Order #, Try Again"
                        if eval_valid("ord")=.f.
                        ui_msg_box("EZ Link",msg1,UI_ATTENTION_SYMBOL+UI_OK)
                        end
                        end if
                        if .not. eval_valid("use_memo_signature")
                        dim global use_memo_signature as l
                        end if

                        DIM ordnote as C
                        DIM shipnote as C
                        DIM old_ordnote as C
                        DIM old_shipnote as C
                        dim pomi as L
                        dim psmi as L
                        dim pomp as L
                        dim psmp as L
                        dim old_pomi as L
                        dim old_psmi as L
                        dim old_pomp as L
                        dim old_psmp as L
                        DIM ordmemo as C
                        ord_rec = table.external_record_content_get("inv_memo","\"\"+recno()","recno()","ord_no = "+quote(ord)+")")
                        if ord_rec != ""
                        tmemo = table.open("inv_memo")
                        tmemo.fetch_goto(val(ord_rec))
                        ordnote = tmemo.Order_Memo
                        shipnote = tmemo.Ship_Memo
                        old_ordnote = ordnote
                        old_shipnote = shipnote
                        pomi = tmemo.P_Om_I
                        psmi = tmemo.P_Sm_I
                        pomp = tmemo.P_Om_P
                        psmp = tmemo.P_Sm_P
                        old_pomi = pomi
                        old_psmi = psmi
                        old_pomp = pomp
                        old_psmp = psmp
                        tmemo.close()
                        end if

                        head1 = "{B=Dirty White}{C=Dark Red}{J=CT}{F=Arial,8,B}ORDER MEMO"
                        head2 = "{B=Dirty White}{C=Dark Red}{J=CT}{F=Arial,8,B}SHIPPING MEMO"
                        ins = "{B=Dirty White}{C=Black}{J=C}{F=Arial,8,B}Press the Tab Key to activate the Save button"
                        ok_button_label = "&OK"
                        cancel_button_label = "&Cancel"
                        ordmemo = ui_dlg_box("Order Notes",""%dlg%
                        {background=Dirty White}{justify=top,center}{region}{font=aril,8,b}{on_key=tab}
                        Print on Invoice Slips? (pomi){text=%O={@@}%18,1.5:head1} Print on Shipping Slips? (pomp);
                        [%mw%.80,8ordnote];{lf};
                        Print on Invoice Slips? (psmi){text=%O={@@}%18,1.5:head2} Print on Shipping Slips? (psmp);
                        [%mw%.80,8shipnote];
                        {endregion};
                        {justify=left}{line=1,0};
                        {justify=center,top}{region}
                        "%T= Save;O={J=C}{I:'$a5_save'} Save %15,2!save_button_click?old_ordnote!=ordnote.or.old_shipnote!=shipnote.or.old_pomi!=pomi.or.old_psmi!=psmi.or.old_pomp!=pomp.or.old_psmp!=psmp"
                        "%T= Cancel;O={J=C}{I:'$a5_record_cancel'} Cancel %15,2!Cancel_button_click ";
                        {condition=version()"5}
                        {text=%O={@@}%70,1.5:ins?old_ordnote!=ordnote.or.old_shipnote!=shipnote.or.old_pomi!=pomi.or.old_psmi!=psmi.or.old_pomp!=pomp.or.old_psmp!=psmp}
                        {condition=.t.}
                        {endregion};
                        %dlg%,""%code%
                        if a_dlg_button = "tab"
                        if version() " 5
                        sys_send_keys("{TAB}")
                        ui_dlg_ctl_goto("Order Notes","save_button_click")
                        end if
                        a_dlg_button = ""
                        end if
                        %code%)

                        if ordmemo = "save_button_click"
                        topparent.restrict_enter=.f.
                        topparent.restrict_change = .f.
                        tmemo = table.open("inv_memo")
                        if use_memo_signature
                        if old_ordnote "" ordnote
                        ordnote = ordnote + "~entered by "+user_name()+" on "+TIME("MM/dd/yy 0h:0mam",NOW())+"~"
                        end if
                        if old_shipnote "" shipnote
                        shipnote = shipnote + "~entered by "+user_name()+" on "+TIME("MM/dd/yy 0h:0mam",NOW())+"~"
                        end if
                        end if
                        if ord_rec != ""
                        tmemo.fetch_goto(val(ord_rec))
                        tmemo.change_begin()
                        tmemo.Order_Memo = ordnote
                        tmemo.Ship_Memo = shipnote
                        tmemo.P_Om_I = pomi
                        tmemo.P_Sm_I = psmi
                        tmemo.P_Om_P = pomp
                        tmemo.P_Sm_P = psmp
                        tmemo.change_end(.t.)
                        else
                        tmemo.enter_begin()
                        tmemo.ord_no = ord
                        tmemo.Order_Memo = ordnote
                        tmemo.Ship_Memo = shipnote
                        tmemo.P_Om_I = pomi
                        tmemo.P_Sm_I = psmi
                        tmemo.P_Om_P = pomp
                        tmemo.P_Sm_P = psmp
                        tmemo.enter_end(.t.)
                        end if
                        tmemo.close()
                        topparent.restrict_enter=.t.
                        topparent.restrict_change = .t.
                        entrystatus = ""
                        topparent.command("REFRESH")
                        end if
                        Daniel Weiss
                        EZ Link Software

                        Comment


                          #13
                          RE: Memo fields - saving to wrong record

                          Tom,

                          I had to send some emails to our network support people to get the answers to your questions. The server is running Windows 2003 and the Workstations Windows XP. Opportunistic locking is disabled.

                          Deene

                          Comment

                          Working...
                          X