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

Is it possible to create an Alias for Column Name in Dialog?

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

    Is it possible to create an Alias for Column Name in Dialog?

    dear All,

    need an advice on how we can setup the alias for DB Column name (Oracle) on A5. the situation like this:

    I have one column which is the fieldname is 29 char length, the limitation on Oracle is 30 char length. this column is working fine when called from oracle or other language prog. however, when called from A5; it always return an error.

    Error Screen


    What I found, the table name I used in this dialog will be used as alias name for the fieldname. in example:
    Code:
    select field_a, field_b from table_a
    is actually transform (in Dialog select sql process) into
    Code:
     select table_a.field_a as table_a_field_a, table_a.field_b as table_a_field_b from table_a
    when I am using alias for the table name to shorten the sql, it is now:
    Code:
     select ta.field_a as ta_field_a, ta.field_b as ta_field_b from table_a ta

    in this case, if the fieldname is equal 30 chars (maximum what SQL can accept); we can no longer use the A5 dialog to perform select query statement. this is due to A5 automatically added table_name before the fieldname as an alias.


    now, my question is:
    instead of using the automated alias naming, is it possible to create an alias for fieldname from Dialog? it is challenging when sql can handle the fieldname but A5 cannot due to added table name in automatic aliasing.


    thanks in advance....

    #2
    Re: Is it possible to create an Alias for Column Name in Dialog?

    i do not work with oracle, so may be my answer won't address your particular issue.
    the alias created is for alpha reference only and when it talks to the database program the result is the one being referenced. so there will be no conflict.
    whether you are creating an inputting dialog to the database or querying dialog you could ask alpha to build the query and then there should not any problem.
    select ta.field_a as ta_field_a, ta.field_b as ta_field_b from table_a ta
    this does not appear to be alpha way of doing things.

    but to answer your question when you build your sql query take a look at the right hand side, there is a link alias, click on it and define your alias to a shorter version.
    see if that helps.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


      #3
      Re: Is it possible to create an Alias for Column Name in Dialog?

      Gandhi,

      it is actually a problem since we cannot create an alias for the column we used on the dialog. perhaps it is just me, but I cannot find a way to manually compose the sql query under dialog.

      when created automatically by A5, the issue was the automatic add of the table name before the column name as the alias. so it will become an issue if the field name was about reaching 30 chars. since the table name was added on the beginning, so it is higly possible that this will lead to error (thus as what I mention before). Yes A5 can allow user to create an alias based on the table name, but not the column name (as same like when we use it with Grid).

      Comment


        #4
        Re: Is it possible to create an Alias for Column Name in Dialog?

        okay
        i looked into dialog, it says you can use sqlselect statement. in the past i was not able to.
        i will give it another shot and let you know.

        (in grid you can do it easily)
        thanks for reading

        gandhi

        version 11 3381 - 4096
        mysql backend
        http://www.alphawebprogramming.blogspot.com
        [email protected]
        Skype:[email protected]
        1 914 924 5171

        Comment


          #5
          Re: Is it possible to create an Alias for Column Name in Dialog?

          thanks Gandhi.... will wait for you feedback on this....

          Comment


            #6
            Re: Is it possible to create an Alias for Column Name in Dialog?

            take a look at this:

            http://screencast.com/t/yzcVSKGrgp
            Last edited by GGandhi; 05-02-2014, 06:33 AM.
            thanks for reading

            gandhi

            version 11 3381 - 4096
            mysql backend
            http://www.alphawebprogramming.blogspot.com
            [email protected]
            Skype:[email protected]
            1 914 924 5171

            Comment


              #7
              Re: Is it possible to create an Alias for Column Name in Dialog?

              Gandhi,

              many thanks with this... but my question is column name alias; your screen example show how to setup the table name alias.

              Comment


                #8
                Re: Is it possible to create an Alias for Column Name in Dialog?

                oh i understand now.
                when you are creating the dialog you can give any name for the variable and set the label for the variable different, is that not so?
                then when you bind the controls to the backend the variable is going to be bound not the descriptive name. is that not correct?
                then that could solve your problem, right?
                thanks for reading

                gandhi

                version 11 3381 - 4096
                mysql backend
                http://www.alphawebprogramming.blogspot.com
                [email protected]
                Skype:[email protected]
                1 914 924 5171

                Comment


                  #9
                  Re: Is it possible to create an Alias for Column Name in Dialog?

                  not precisely....

                  what I want is to give alias name for column or fieldname.... the same way I can do with the table name....

                  Comment


                    #10
                    Re: Is it possible to create an Alias for Column Name in Dialog?

                    ok, i understand. sorry i was not able to help.
                    thanks for reading

                    gandhi

                    version 11 3381 - 4096
                    mysql backend
                    http://www.alphawebprogramming.blogspot.com
                    [email protected]
                    Skype:[email protected]
                    1 914 924 5171

                    Comment


                      #11
                      Re: Is it possible to create an Alias for Column Name in Dialog?

                      Gandhi,

                      by replying means you stay with me and also already encourage me for more research. and that is also 'help' for me.... thanks for that too........

                      Comment


                        #12
                        Re: Is it possible to create an Alias for Column Name in Dialog?

                        You could potentially investigate & modify the SQL query in the e object in the Server-Side events --- IF you have access to it (you may not.) But, that might be more work than just writing all the data fetching, populating, and submitting yourself using the SQL::Connection and SQL::Arguments constructs provided by Alpha. (UPDATE/EDIT: I prefer this over data binding!)

                        I have run into problems with really long queries in the past using MySQL and my solution was to create a view and use that instead of operating on the tables direct. That was for a grid, though. I don't know how that would work with a Dialog.
                        Last edited by TheSmitchell; 05-06-2014, 12:10 PM.
                        Alpha Anywhere latest pre-release

                        Comment


                          #13
                          Re: Is it possible to create an Alias for Column Name in Dialog?

                          Sarah,

                          many thanks for the reply.

                          I don't see options or ways to 're-touch' the current generated sql syntax on Dialog. I hope A5 team can help me to solve this problem, as it would have wide impact if the table fieldname is reaching SQL limit.

                          Comment


                            #14
                            Re: Is it possible to create an Alias for Column Name in Dialog?

                            Originally posted by FaisalY View Post
                            Sarah,

                            many thanks for the reply.

                            I don't see options or ways to 're-touch' the current generated sql syntax on Dialog. I hope A5 team can help me to solve this problem, as it would have wide impact if the table fieldname is reaching SQL limit.
                            If there is a way to modify the sql, you'll have to dig deep in the xbasic side of things. It won't be obvious, if you can edit the auto generated code.

                            You can always write your own xbasic to fetch all the sql data and generate the javascript to populate your controls in the dialog.
                            Alpha Anywhere latest pre-release

                            Comment


                              #15
                              Re: Is it possible to create an Alias for Column Name in Dialog?

                              I don't see options or ways to 're-touch' the current generated sql syntax on Dialog.
                              options? yes. how easy for you, you be the judge.

                              compileStringTemplate()
                              function take a look in Wikipedia.
                              or someway if you are able to shorten the name. ( redundant.. you would have done it if you could, you would not be posting)
                              thanks for reading

                              gandhi

                              version 11 3381 - 4096
                              mysql backend
                              http://www.alphawebprogramming.blogspot.com
                              [email protected]
                              Skype:[email protected]
                              1 914 924 5171

                              Comment

                              Working...
                              X