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

xbasic function is not working in alpha five v11 web application

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

    xbasic function is not working in alpha five v11 web application

    i wrote xbasic function in the grid component.it is working in one alpha five v11 bulid- 4096,compilers microsoft ccompiler version 1600 OS-window xp.it is not working in another system with same alpha five v11 build 4096,microsoft ccompiler version 1600 software OS-window 7.


    function updatingNextCVFeedFollowUpDate as c (e as p)
    Dim RequirementName as c
    RequirementName=e._currentRowDataOld.Requirement_Name
    ui_msg_box("test",RequirementName)
    DIM CVFeedBackFollowUpSQLConnection as sql::Connection
    if CVFeedBackFollowUpSQLConnection.open("::Name::RMS-Sql") = .F. then
    CVFeedBackFollowUpSQLConnection.Close()
    exit function

    end if
    Dim CVFeedBackFollowUpSQLCommandl as c
    Dim CVFeedBackFollowUpArgs as sql::Arguments
    CVFeedBackFollowUpSQLCommand="update requirements set Last_CV_Feedback_Followup_Date=:NextCVFeedbackFollowupDate where Requirement_Name=:RequirementName"
    CVFeedBackFollowUpArgs.Add("RequirementName",RequirementName)
    CVFeedBackFollowUpArgs.Add("NextCVFeedbackFollowupDate",e._currentRowDataOld.Next_CV_Feedback_Followup_Date)
    if CVFeedBackFollowUpSQLConnection.Execute(CVFeedBackFollowUpSQLCommand,CVFeedBackFollowUpArgs)=.f.
    CVFeedBackFollowUpSQLConnection.Close()
    exit function

    end if
    CVFeedBackFollowUpSQLConnection.Close()
    end function

    #2
    Re: xbasic function is not working in alpha five v11 web application .

    You did not say what was not working, what error you get or what you expect it to so, so hard to help. But if the problem is that this line fails to work ui_msg_box("test",RequirementName), it is not supposed to work, at all in any web application. UI_ functions are Windows GUI features that work only in a desktop (Windows GUI) environment.

    Or if the connection to the sql server fails, I would look at your connection name "RMS-Sql". I have no idea if you can or cannot include hyphens in a connection name, but I would never do it. "RMS_Sql" would be a better name if you need to separate the terms.

    Also, just as an aside, your syntax is overly verbose, makes it hard to read and debug. Personal preference of course, you can word it anyway you want, but I would rewrite it as below (I included the proper syntax to show your 'msg box'):

    function updatingNextCVFeedFollowUpDate as c (e as p)
    dim RequirementName as c
    RequirementName=e._currentRowDataOld.Requirement_Name

    updatingNextCVFeedFollowUpDate = alert(RequirementName);

    dim cn as sql::Connection
    if cn.open("::name::conn") = .F. then
    cn.close()
    exit function

    end if
    dim vsql as c
    dim args as sql::Arguments
    vsql = <<%txt%
    UPDATE requirements
    SET Last_CV_Feedback_Followup_Date=:NextCVFeedbackFollowupDate
    WHERE Requirement_Name=:RequirementName
    %txt%
    args.add("RequirementName",RequirementName)
    args.add("NextCVFeedbackFollowupDate",e._currentRowDataOld.Next_CV_Feedback_Followup_Date)

    if cn.Execute(vsql,args)=.f.
    cn.close()
    exit function

    end if
    cn.close()
    end function
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Re: xbasic function is not working in alpha five v11 web application .

      Originally posted by kalisiddhu View Post
      it is not working in another system with same alpha five v11 build 4096,microsoft ccompiler version 1600 software OS-window 7.[/B]
      Do you get an error message or does the sql update just not update the record you expect.

      I would suggest try running it in the debugger but it thats not possible add logging code to log code execution and CVFeedBackFollowUpSQLConnection.callresult.text to a text file
      see http://wiki.alphasoftware.com/SAVE_TO_FILE+Function

      AFAIK ui_msg_box is NOT supported in web apps.
      https://appsbydesign.co.uk/

      Comment


        #4
        Re: xbasic function is not working in alpha five v11 web application .

        Originally posted by mumfie View Post
        Do you get an error message or does the sql update just not update the record you expect.

        I would suggest try running it in the debugger but it thats not possible add logging code to log code execution and CVFeedBackFollowUpSQLConnection.callresult.text to a text file
        see http://wiki.alphasoftware.com/SAVE_TO_FILE+Function

        AFAIK ui_msg_box is NOT supported in web apps.
        Just a thought, and a totally "moot" issue I suppose: But wouldn't it have been "smart" for the a5 web server to have been designed so that non-functional "desktop based UI code" (like the msgbox()) was "parsed" and converted to it's "javascript equivalent?" When you're forcing the usage of a "proprietary web server" (instead of IIS) & using a non-industry standard development "back-end" language..... One would arguably expect that the a5 web server would have been designed as such.....
        Robert T. ~ "I enjoy manipulating data... just not my data."
        It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
        RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

        Comment


          #5
          Re: xbasic function is not working in alpha five v11 web application .

          Originally posted by SNusa View Post
          But wouldn't it have been "smart" for the a5 web server to have been designed so that non-functional "desktop based UI code" (like the msgbox()) was "parsed" and converted to it's "javascript equivalent?"
          javascript would likely be unreliable as it has to be subsequently returned to the client browser to execute. You can however create your own custom javascript to return in many events which will work.
          Another option is for WAS to ignore ignore desktop commands but that might result in bugs that are very difficult to trace.
          https://appsbydesign.co.uk/

          Comment


            #6
            Re: xbasic function is not working in alpha five v11 web application .

            Originally posted by kalisiddhu View Post
            i wrote xbasic function in the grid component.it is working in one alpha five v11 bulid- 4096,compilers microsoft ccompiler version 1600 OS-window xp.it is not working in another system with same alpha five v11 build 4096,microsoft ccompiler version 1600 software OS-window 7.
            This is just parroting what Steve suggested. But I would also suggest you return an alert or log the output of your CVFeedBackFollowUpSQLConnection's callResult in the event of either connection or SQL execution failure.
            Code:
            [COLOR="#0000CD"]function [/COLOR]updatingNextCVFeedFollowUpDate [COLOR="#0000CD"]as c[/COLOR] (e [COLOR="#0000CD"]as p[/COLOR])
            
                [COLOR="#0000CD"]DIM [/COLOR]RequirementName [COLOR="#0000CD"]as c[/COLOR] = e._currentRowDataOld.Requirement_Name	
                
            [COLOR="#008000"]    'Replace ui_msg_box("test",RequirementName); it isn't supported on the web server
                'Returns javascript alert box that will be executed client-side
            [/COLOR]    updatingNextCVFeedFollowUpDate = [COLOR="#666666"]"alert('"[/COLOR] + js_escape(RequirementName) +[COLOR="#666666"] "');"[/COLOR]
            
                [COLOR="#0000CD"]DIM [/COLOR]CVFeedBackFollowUpSQLConnection [COLOR="#0000CD"]as sql::Connection[/COLOR]
            
                [COLOR="#0000CD"]if [/COLOR](CVFeedBackFollowUpSQLConnection.open("::Name::RMS-Sql") = [COLOR="#0000CD"].F.[/COLOR]) [COLOR="#0000CD"]then[/COLOR]
            [COLOR="#008000"]        'Return error alert regarding failure to connect
            [/COLOR]        *concat(updatingNextCVFeedFollowUpDate, [COLOR="#666666"]"alert('Error opening connection: "[/COLOR] + js_escape(CVFeedBackFollowUpSQLConnection.callResult.text) + [COLOR="#666666"]"');"[/COLOR])
                    CVFeedBackFollowUpSQLConnection.Close()
                    [COLOR="#0000CD"]exit function
                end if[/COLOR]
            
            [COLOR="#008000"]    'Your original DIM here was CVFeedBackFollowUpSQLCommandl, not CVFeedBackFollowUpSQLCommand
            [/COLOR]    [COLOR="#0000CD"]DIM [/COLOR]CVFeedBackFollowUpSQLCommand [COLOR="#0000CD"]as c[/COLOR] =[COLOR="#666666"]<<%SQL%
            UPDATE requirements 
            SET Last_CV_Feedback_Followup_Date = :NextCVFeedbackFollowupDate 
            WHERE Requirement_Name = :RequirementName
            %SQL%[/COLOR]
            
                Next_CV_Feedback_Followup_Date = e._currentRowDataOld.Next_CV_Feedback_Followup_Date
            
                [COLOR="#0000CD"]DIM [/COLOR]CVFeedBackFollowUpArgs [COLOR="#0000CD"]as SQL::Arguments[/COLOR]
                CVFeedBackFollowUpArgs.Set([COLOR="#A9A9A9"]"RequirementName"[/COLOR],RequirementName)
                CVFeedBackFollowUpArgs.Set([COLOR="#A9A9A9"]"NextCVFeedbackFollowupDate"[/COLOR],Next_CV_Feedback_Followup_Date)
            
                [COLOR="#0000CD"]if [/COLOR]( CVFeedBackFollowUpSQLConnection.Execute(CVFeedBackFollowUpSQLCommand, CVFeedBackFollowUpArgs) = [COLOR="#0000CD"].F.[/COLOR] ) [COLOR="#0000CD"]then[/COLOR]
            [COLOR="#008000"]        'Return alert with information about why the SQL execution failed
            [/COLOR]        *concat(updatingNextCVFeedFollowUpDate, [COLOR="#666666"]"alert('Error executing SQL statement: "[/COLOR] + js_escape(CVFeedBackFollowUpSQLConnection.callResult.text) + [COLOR="#666666"]"');"[/COLOR])
                    CVFeedBackFollowUpSQLConnection.Close()
                   [COLOR="#0000CD"] exit function
                end if[/COLOR]	
            
                CVFeedBackFollowUpSQLConnection.Close()
            [COLOR="#0000CD"]
            end function[/COLOR]
            Alpha Anywhere latest pre-release

            Comment


              #7
              Re: xbasic function is not working in alpha five v11 web application .

              Originally posted by SNusa View Post
              Just a thought, and a totally "moot" issue I suppose: But wouldn't it have been "smart" for the a5 web server to have been designed so that non-functional "desktop based UI code" (like the msgbox()) was "parsed" and converted to it's "javascript equivalent?" When you're forcing the usage of a "proprietary web server" (instead of IIS) & using a non-industry standard development "back-end" language..... One would arguably expect that the a5 web server would have been designed as such.....
              It's moot, Robert. As far as I know, the only way to have a desktop app be web convertible is to build it web ready to begin with. And given that Alpha goes way back and the ui_msg_box() and lots of other functionality predate web app popularity, if not the web itself, I don't see how you could expect Alpha to be so clairvoyant as to anticipate that reality and be 100% pre-prepared for it. Silly actually.
              Peter
              AlphaBase Solutions, LLC

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


              Comment


                #8
                Re: xbasic function is not working in alpha five v11 web application .

                Originally posted by Peter.Greulich View Post
                It's moot, Robert. As far as I know, the only way to have a desktop app be web convertible is to build it web ready to begin with. And given that Alpha goes way back and the ui_msg_box() and lots of other functionality predate web app popularity, if not the web itself, I don't see how you could expect Alpha to be so clairvoyant as to anticipate that reality and be 100% pre-prepared for it. Silly actually.
                Hi Peter;

                On one level I agree with you 110%. On the other hand (IMO): The path presently traveled (by Alpha) is continually & effectively "eroding/depreciating the value of xBasic." Instead, Alpha has been adopting & "necessitating fluency" in many different interdependent technologies (without which, a developer cannot "confidently" deliver products "anywhere.") From my point of view, this questions the very reason for AlphaSoftware's existence in the first place. This is not good. ~ And the lack of activity on the forums for their new product seems to seems to reflect this.

                PS: I for one really enjoy working with their version of "Basic", more so than with any other variants I have come across. ~ But Alpha's recent offerings leave me thinking "what's the point?" (And I think that's the problem for a lot of us as we look at the alternatives.)
                Last edited by SNusa; 12-28-2013, 01:29 PM.
                Robert T. ~ "I enjoy manipulating data... just not my data."
                It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                Comment


                  #9
                  Re: xbasic function is not working in alpha five v11 web application .

                  Its a question of where do you stop. Alpha already has lots of xbasic that reproduces traditional non-xbasic functions. I am thinking about Portable SQL, Action Javascript, and other "helper" functions. But really, software development requires expertise in multiple areas. Do you want Xbasic to replace CSS, Javascript, SQL, etc.? Where would you stop? And why should I purposely degrade my skills and marketability as a web application developer by learning an Xbasic method that obscures for me the most common, accepted method by all other developers. As an A5 web developer I have been forced to also learn HTML, CSS, SQL, Javascript, JQuery, carbon dating, and other 3rd party tools. If Alpha had an Xbasic function to replace each of those, would I be better off using Xbasic or the native resource? If you were a paying customer of mine, would you want me to ONLY know Alpha Five? It is the integration of resources not a replacement that makes Alpha Five a useful tool.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: xbasic function is not working in alpha five v11 web application .

                    Hi Steve;

                    I realize this thread became "way off topic", but not a big deal since the OP's question was answered in the first few posts.....

                    Where would I stop? Given Alpha's 20+ years of marketing Alpha as the tool for everyone including "non programmers", the answer is fairly simple: Use the KISS method. 1 layer for SQL/database integration (AlphaDAO) for database integration, and 1 for coding (xBasic.) (with a touch of exposure to javascript for the web) Too much beyond that and I think they end up catering to a new audience that doesn't exist in any significant numbers..... I suspect that most software developers (with a "high-end" well rounded skill set like yourself) are going to choose industry standard tools to minimize risk. (unless there are huge benefits elsewhere) ~ In this regard, AA has arguably lost most of it's significant advantage(s). Obviously everyone is entitled to their own opinion. In the end, the mighty $ will do the voting & dictate the future.

                    I do agree with your statement, but only for those who wish to develop ONLY for the web and for those who ALREADY have a strong background in xBasic. Even so, the fact one chooses AA mandates that they must use (at the core), a proprietary language along with a very "unique & expensive WAS."

                    Irrespective, 20+ years was invested in marketing a5 to those who wanted things to be simple and under one roof. It's purpose of existence (to much of the user base) was originally to enable non coders to code. (And then grow with the tool as their skill levels grew.) At present, much of their existing desktop user base has been left with the feelings of "abandonment." (Even more so since v.11 now suffers from the recent update to ie.11, and no v.11 updates are seemingly forthcoming to address this.) ~ In this regard, Alpha isn't even "kicking the dead horse", they are "kicking the rider" instead.

                    My questions for you are: Would you encourage "a newbie" to pick up AA instead of another tool? And if so, why? (And would you even consider suggesting v.12 (AA) for those who wish to produce desktop/lan applications?) Finally (without an update to fix v.11 with regards to ie11 breaking the web desktop tools), hasn't the sun "already set" on v.11?

                    PS: The recent ie11 update (which resulted in the the "breaking" of v.11 web tools on the desktop) is the very reason I have always thought of this kind of approach/solution/dependencies to/for/of desktop development as being "undesirable" at best. I do understand the reasons for "settling" on one standardized presentation level. ~ But at what costs?
                    Last edited by SNusa; 12-29-2013, 12:14 AM.
                    Robert T. ~ "I enjoy manipulating data... just not my data."
                    It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
                    RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

                    Comment

                    Working...
                    X