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

OnExistingRowRender event handler error setting session variables

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

    OnExistingRowRender event handler error setting session variables

    Hello, I am working on upgrading from v10.5 to v11 and have 5 production sites running on a dedicated godaddy server

    4 of the sites are up and running with v11 with no problems, but the 5th one has been a problem child

    Currently I am trying to figure out why I'm getting this error on the dedicated production server but it works fine on my development machine (running local)

    Error message -> Error executing OnExistingRowRender event handler: command: dim session.__protected__startdate as D Exception executing XBasic instruction.

    I know I saw something in the "what's new' release notes for v11 that touched on this, but I cannot zoom in on anything specific that says how to code this under v11. This particular OnExistingRowRender event in my app loads up about 40 session variables and all of the character formatted ones are fine. My memory says there's an article about this being handled differently in v11 but like I said earlier, I just cannot seem to understand what I need to do with this.

    Any suggestions are much appreciated

    Thanks, Dave

    #2
    Re: OnExistingRowRender event handler error setting session variables

    When referring to the session variable in that event, you need to use e.rv.Session. So your instruction should be:

    Code:
    dim e.rv.session.__protected__startdate as D
    I'll note too, that for version 12 compatibility, session variables may need to be character-type. Not a critical item here or now, but worth noting for future development.

    Also, your __Protected__ part of the string is still OK - does no harm, but starting with v11, all session variables are protected, so you could just as well have:

    Code:
    dim e.rv.session.startdate as D
    -Steve
    sigpic

    Comment


      #3
      Re: OnExistingRowRender event handler error setting session variables

      Thanks Steve.... what you mentioned about v12 was what I was recalling but didn't distinguish it as a future item to consider. Hard to keep all the new v11 stuff straight.

      As for the "e.rv." prefix on the dim statement ..... why does it work when run locally ? It is concerning to think code that works in development and tested on the local WAS will not execute in a production web environment.

      I'll try your suggestion later tonight after the traffic slows down at 11pm (time to brew more coffee)

      Thanks, Dave

      Comment


        #4
        Re: OnExistingRowRender event handler error setting session variables

        Bummer.... adding "e.rv." didn't work. Newest error message is Error executing OnExistingRowRender event handler: command: dim e.rv.session.__protected__startdate as D Exception executing XBasic instruction

        Comment


          #5
          Re: OnExistingRowRender event handler error setting session variables

          Making some progress

          Tried different variations of the "dim" statement to no avail. So I tried declaring the property type in the instruction that sets the value instead of the dimension statement and that worked

          original code that fails on the web server (but works locally)
          dim e.rv.session.__protected__startdate as D
          e.rv.session.__protected__startdate = e.rowData.data("start_date")


          modified code that works on the web server
          dim e.rv.session.__protected__startdate as c
          e.rv.session.__protected__startdate = convert_type(e.rowData.data("start_date"),"D")


          the bad news comes in two flavors

          1) now I've unearthed a bunch of xbasic functions that are getting similar errors in the "add.args" statement. I'm 99% sure it's going to be the same basic

          2) The errors I encountered all involved dates and times but I also have about 10 variables that are numeric, but didn't get any errors when those variable get set in the function. But just because there wasn't an error message doesn't mean the numeric variables are set correctly. I'm going to have to test everything inside out (about 50 grids and most of them have server-side events and xbasic function). I'd much rather get errors rather than search for some piece of data that doesn't get processed correctly because of a property type issue and no errors are generated


          I really wish there was an explaination of why this works on a local machine but not on a web server

          Comment


            #6
            Re: OnExistingRowRender event handler error setting session variables

            Pretty pleeeease....

            Alpha Software, would you post a corrected chapter 37 for the "Alpha Five� Professional Learning Series: Introduction to Web Applications" that explains the proper use and intent of session variables under Alpha 11?


            The sample should demonstrate a session variable method that works under both "Working Preview" mode AND running for real under the server. The sample must demonstrate that the session variable can be set in one grid and picked up by the called grid and that the code will work under both modes of operation (WP and server). There seems to be a difference in how WP and server mode work, depending on the GLOBAL / SHARED / PRIVATE storage class when omitted from the DIM!!! Also, might be good to throw in a discussion about client-side caching of session variables and how to avoid that. And, if you could demonstrate how two instances of a browser running on the localhost could each get their own copy of session variables, it would be icing on the cake.


            Thanks.


            -Rich Fulham

            Comment

            Working...
            X