Alpha Video Training
Results 1 to 23 of 23

Thread: Trace window error - after a refresh shadow

  1. #1
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Trace window error - after a refresh shadow

    For years we have never had a problem with refreshing a shadow. Now we get a 4 Warnings - (Trace Window) every time we do it. I am not a programmer but I can make out that the field named User_C seems to be the culprit. This is a calculated field picking up its information from the login person.

    Warning [1]: Error(s) opening rules for field: USER_C
    Warning [2]: Error adding calculated rule to database engine.
    Warning [3]: Error(s) opening rules for field: USER_C
    Warning [4]: Error parsing 'calc' rules expression.

    I have attached a picture of the field rule - any ideas on how I can fix this ?

    Right now if someone refreshes, I have to delete their current shadow and do a whole new Network Optimize on their computer so they can work.

    Thanks in advance
    Terri
    Attached Images Attached Images

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    The error suggests that, for whatever reason, the shadowed copy cannot see the referenced variable. You might double check the login routine to ensure that the variable is being declared as global.

    I was able to duplicate your experience by creating a global variable, creating a calculated field in a table referencing that global variable, deleting the variable, opening the table.

    Warning [1]: Error(s) opening rules for field: NAME
    Warning [2]: Error adding calculated rule to database engine.
    Warning [3]: Error(s) opening rules for field: NAME
    Warning [4]: Error parsing 'calc' rules expression.
    Last edited by Stan Mathews; 08-30-2018 at 12:34 PM.
    There can be only one.

  3. #3
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    Thanks Stan - Jim Chapman built this database for us and as I look in the scripts he had this 'showGlobalVariables' -- I ran it and it does show the variable is global - see attached

    Unless there is somewhere else I should be looking?
    Attached Images Attached Images

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    That's as it should be. The question now is whether the same is true on the shadowed copy when the error occurs.

    If you put a new button on a form (in the development database) and code it

    ui_msg_box("Logged in user is"+var->vloginusertc)

    then after a Refresh Shadow you should see the button on the user machine and be able to test.
    There can be only one.

  5. #5
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    It's telling me too few parameters? when I hit the button ?

  6. #6
    Member
    Real Name
    Allen Klimeck
    Join Date
    Apr 2000
    Location
    Colorado
    Posts
    535

    Default Re: Trace window error - after a refresh shadow

    ui_msg_box("ERROR","Logged in user is"+var->vloginusertc)

  7. #7
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    Thanks, Allen.

    I was going to use the msgbox() function which doesn't require all three parameters but couldn't recall if v8 supported it. Swiched back to ui_msg_box() and didn't complete the thought.
    There can be only one.

  8. #8
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    Thank you both - it does return the user name on the shadow but unfortunately I still get the same 4 Warning errors if I refresh

    Any more ideas?

  9. #9
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,642

    Default Re: Trace window error - after a refresh shadow

    When the global variable gets initialized can also be a factor. Is it dimmed in the Autoexec?
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  10. #10
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    Hi Robin - thanks but like I said I am not a programmer - give me a hint on where I should look for the Autoexec - Also I have noticed that at least one computer (out of the 7 I have tried so far), does not have the warnings after the refresh - I have 23 more to check out. Any idea why that one would not show an error? The shadow comes from the same development database.

  11. #11
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    On the code tab where you found the global variables script you should find the autoexec.

    I assume you have a pretty stable environment if you are still using V8. I don't see how anything could have changed but have you verified that the runtime version/build is the same as the development? All machines using the same Windows version/updates and antivirus?
    There can be only one.

  12. #12
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    We have used v8 since 2009 (Started with v2!) - had problems at the beginning but things have been stable for most of the years - the only thing that has changed is we moved everything to a new server a couple of weeks ago. Until we did a refresh for something I did not realize it was not working -- EXCEPT it works on that one computer - very strange.

    We are all on Windows 7 / same antivirus etc and the same version/build of V8 -

    I looked for the autoexec in the code list but do not see it there - screenshot attached - I arranged the list in alphabetical order.
    Attached Images Attached Images

  13. #13
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    It is not necessary that there be an autoexec. You database may be set up so that the login process is triggered by the init of the startup form and the globals are populated there.

    Issue is likely something with the new server. Can you check the detail view of the runtime users' control panel, tables/sets tab, and see if the list all point to the same directory? Or just the "good" one vs one "bad" one.
    Last edited by Stan Mathews; 08-31-2018 at 11:41 AM.
    There can be only one.

  14. #14
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    I believe that is how it is set up - they click on the shortcut and it opens to their login screen -- so where do I find this 'init of the startup form' to check it out ?

  15. #15
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    In design mode if you use the File menu, Database Properties, you should see on the Startup tab the designation for which form is shown when the database is opened. If you put that form in design mode and check its events you should see Oninit.

    But, as one computer is working correctly the issue is likely not the global variable. More likely something different with the new server and where the runtimes are pointed.
    There can be only one.

  16. #16
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,642

    Default Re: Trace window error - after a refresh shadow

    In the screenshot for the field rules I see that the Validation tab is checked as well as the Events tab - what's in those?
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  17. #17
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    Click on the tab to find out.
    There can be only one.

  18. #18
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    There is nothing in the Validation tab and today there is no checkmark -- I have found if I am clicking through sometimes the checkmark will stay there even if there is nothing in that particular screen. Like when I was looking for anything on this field the other day, I clicked through each tab and the checkmark stayed on the Validation tab so when I took the screen shot it was there.

    Today I did the screen shot of the Events tab and you can see the checkmark is not there anymore on Validation.

    Found a 2nd computer that the Refresh works fine on! 13 more left to check.

    All runtimes point to the same place on the new server.
    Attached Images Attached Images

  19. #19
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    The fact that Record Events is bolded and the tab checked means that there is code set for one of the record events. You have to click on the radio button to see which event and its code.
    There can be only one.

  20. #20
    Member
    Real Name
    Terri Hernacki
    Join Date
    Dec 2000
    Location
    South Elgin IL
    Posts
    166

    Default Re: Trace window error - after a refresh shadow

    OK -- now I see and 'addin' ? for 2 events - posted below -
    Attached Images Attached Images

  21. #21
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Trace window error - after a refresh shadow

    There can be only one.

  22. #22
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,011

    Default Re: Trace window error - after a refresh shadow

    Your stuff may be in an external library - To ease the situation change the field rule to "user_name()" or create a autoexec script with entry
    dim curuser as c
    curuser = user_name()
    and then use "var->curuser" in the field rules
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

  23. #23
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,011

    Default Re: Trace window error - after a refresh shadow

    Make sure shadow includes file: User_group_info for ADB name.* "Shadow may not be set to bring that over if it is being used in some way.
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

Similar Threads

  1. Trace Window error
    By Finian Lennon in forum Windows Desktop Applications
    Replies: 3
    Last Post: 03-07-2017, 12:23 PM
  2. trace window error list
    By dik_coleman in forum Alpha Five Version 6
    Replies: 3
    Last Post: 07-06-2013, 06:29 PM
  3. Error in trace window
    By samed in forum Alpha Five Version 8
    Replies: 13
    Last Post: 05-03-2008, 09:37 AM
  4. Trace Window Error
    By Chris A in forum Alpha Five Version 6
    Replies: 11
    Last Post: 02-28-2005, 06:25 AM
  5. Trace Window and error 1508
    By Dr Alok Modi MD in forum Alpha Five Version 5
    Replies: 7
    Last Post: 04-25-2004, 11:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •