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

now() behaviour suddenly changes

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

    now() behaviour suddenly changes

    I'm more or less a newbie on alphafive but a geriatric systems wise.. building my first a5 app.

    I have been using the now() function in an action scriot immediately before saving a record to provide an audit trail. This all worked fine up until Monday night, 12 June. I started work on Tuesday, and (without making any code changes) the input form crashed at that point with an error 'invalid date/time format'. I set up a simple system with two fields in (one character, one time) in a new database and the same thing happens.

    I'm really stumped. What could I have changed on the PC or alphafive which would cause this? It's obviously not to do with the orginal code at all.

    Any hints or pointers would be very gratefully received.

    #2
    Originally posted by gothic
    I'm more or less a newbie on alphafive but a geriatric systems wise.. building my first a5 app.

    I have been using the now() function in an action scriot immediately before saving a record to provide an audit trail. This all worked fine up until Monday night, 12 June. I started work on Tuesday, and (without making any code changes) the input form crashed at that point with an error 'invalid date/time format'. I set up a simple system with two fields in (one character, one time) in a new database and the same thing happens.

    I'm really stumped. What could I have changed on the PC or alphafive which would cause this? It's obviously not to do with the orginal code at all.

    Any hints or pointers would be very gratefully received.
    It'll be a lot easier to comprehend if you attach a sample table, and its support files, which demonstrates the problem.
    There can be only one.

    Comment


      #3
      now problem example

      Stan

      I'm amazed at such a fast response ! Thank you.

      I've attached a zip file with the test table in, plus a screen shot to show the error, because it could be something to do with my PC... though I don't know what it might be.

      I suspect it's something embarrassingly silly.

      :o

      Comment


        #4
        Originally posted by gothic
        Stan

        I'm amazed at such a fast response ! Thank you.

        I've attached a zip file with the test table in, plus a screen shot to show the error, because it could be something to do with my PC... though I don't know what it might be.

        I suspect it's something embarrassingly silly.

        :o
        Sorry, home now without Alpha. Will lood in the morning if someone else doesn't answer first.
        There can be only one.

        Comment


          #5
          Tim,

          I couldn't generate the error here using your sample.

          However, I see two things I'd change:

          a) in the OnInit for the form, switch the order of your action scripting statements. Your form's data entry style is modal. Enable edits, then begin the new record. Don't do it in reverse.

          b) in the onPush event for your form's button, edit the first action statement. The expression you supplied to the genie was
          Code:
          date() + cr() + lf()
          This happened because you pressed the ENTER key after typing "date()" when typing the expression you wanted Alpha Five to use when setting the value property of the field object. You should remove the hard carriage return using the little xy button to get to the expression builder.

          -- tom

          ps. Alpha Five has a rudimentary audit trail facility that is built in. If you haven't explored it you probably should. It might save you a bit of work. Dr. Wayne's "Xbasic for Everyone" contains a n example of a more robust audit trail system.
          Last edited by Tom Cone Jr; 06-15-2006, 09:39 PM.

          Comment


            #6
            now() behaviour suddenly changes

            Gentlemen

            Thanks you for your input.. and for the other helpful hints. I've been in the computer biz for 35 years, but not touched code in anger for the last 30, so I'm learning to ride the bike again, so to speak.

            now() works interactively in the code editor, so I'm still stumped. However, I have now restructured the transaction file in question to hold a date and a time and that will work, although it's slightly more tedious to answer the question 'how long since" ..

            I would still be very interested to understand the cause of this oddity.

            Thanks again

            Comment


              #7
              Tim, I'm sorry but I don't follow.

              Are you saying the sample you uploaded is not working correctly after the changes I recommended?

              What does "restructured the transaction file" mean?

              The NOW() function returns a TIME data type. Read the help file discussion on how to create a table. There's a section there describing the permitted field data types. A TIME field type holds both a date and a time. Contrast that with a Short Time field type.

              -- tom

              Comment


                #8
                Tom and Tim,

                I do in fact get the behavior Tim reports--even after making Tom's changes.

                The following had no effect:
                -starting over with the default form;
                -converting the command to inline xbasic and stripping away unnecessary code;
                -making the form modeless.

                So until inspiration strikes I'm stumped.
                Bill Hanigsberg

                Comment


                  #9
                  Version number

                  4067.3030

                  (Just for the record).
                  Bill Hanigsberg

                  Comment


                    #10
                    Bill, I ran the sample on a second machine and it works fine. Even without making the changes I recommended. I cannot throw an error using his button.

                    I'm wondering if this might be related to regional differences in dates ? Are you configured differently than me? I'm using MM/DD/YYYY.

                    -- tom

                    Comment


                      #11
                      now() behaviour suddenly changes

                      Progress - see below. I'm also relieved that it isn't just me :-))

                      First, Tom, to answer your question, making the changes you suggested didn't have any effect. I also tried it with in-line code.. no go.

                      So I went back to square one .. what did I do between 12th June and 14th June which might have had an effect ... things don't just "suddenly change". The answer is that on 13th June I ran an upgrade to 4067.3030 (I should have twigged this earlier). In other words, it works in the older version, but not in the new.

                      Here in London, I am of course set up for dd.mm.yyyy .. could this have a bearing ? Bill, what is it out there in Canada ? I'll try and run the old version in a controlled test.

                      Thank you both for your valuable input.

                      [Aside: Tom, what I am doing is building a small transaction system which takes in cash movement requirements and then generates SWIFT (money transfer) instructions. I am tracking each key event by holding who the user was, when (which is they the 'now' was for) they authorised this or pressed that key. I have now changed each data type T for a date and a time, recording the time as C via time().The reason for this is that single payments may be for $500million, so it needs tight monitoring. By the way, no XML import in 2006 is a _real_ bore.]

                      Comment


                        #12
                        Regional settings

                        On my test machine (which I cannot fiddle with at the moment)

                        Short date: dd/MM/yyyy
                        Long date: MMMM d, yyyy

                        Canada, as in so many things, is in multiple personality mode as to dates.
                        -French
                        -French Canadian
                        -English (UK)
                        -English (Canada)
                        -English (USA)

                        One has no idea what setting will be on a giving machine which keeps you on your toes.

                        Consult the release notes on the latest version and you will see that they fixed a bug (reported by me as it happens) regarding date values in smart fields. I have no idea if this is related to our issue.
                        Bill Hanigsberg

                        Comment


                          #13
                          Originally posted by gothic
                          Progress - see below. I'm also relieved that it isn't just me :-))

                          First, Tom, to answer your question, making the changes you suggested didn't have any effect. I also tried it with in-line code.. no go.

                          So I went back to square one .. what did I do between 12th June and 14th June which might have had an effect ... things don't just "suddenly change". The answer is that on 13th June I ran an upgrade to 4067.3030 (I should have twigged this earlier). In other words, it works in the older version, but not in the new.

                          Here in London, I am of course set up for dd.mm.yyyy .. could this have a bearing ? Bill, what is it out there in Canada ? I'll try and run the old version in a controlled test.

                          Thank you both for your valuable input.

                          [Aside: Tom, what I am doing is building a small transaction system which takes in cash movement requirements and then generates SWIFT (money transfer) instructions. I am tracking each key event by holding who the user was, when (which is they the 'now' was for) they authorised this or pressed that key. I have now changed each data type T for a date and a time, recording the time as C via time().The reason for this is that single payments may be for $500million, so it needs tight monitoring. By the way, no XML import in 2006 is a _real_ bore.]
                          You can write your own xml import script if the structure of the xml file is consistent from file to file. See this code archive entry.
                          There can be only one.

                          Comment


                            #14
                            I've submitted a bug report after verifying that the error occurs when the regional date/time settings are English (United Kingdom), but the error does not occur if the regional date/time settings are English (United States).

                            -- tom

                            Comment


                              #15
                              Tom, thanks for posting the bug report, and Bill, thanks for confirming the problem

                              Also, Stan, thanks for the XML import link.

                              I think this closes down this thread, and I'll keep my eye open for the fix!

                              I guess this goes to show just how hard it is to write globally sold software...

                              Comment

                              Working...
                              X