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

Dropdown List box has extra blank records not in database

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

    Dropdown List box has extra blank records not in database

    I have a DropDownBox populated by an SQL query:

    SELECT DISTINCT a5_catch_area_dropdown, CATCH_AREA_CODE FROM tocas_dba.CATCH_AREA_LOOKUP WHERE StringLength(a5_catch_area_dropdown) > 0 ORDER BY CATCH_AREA_CODE

    The problem: There are 382 records in this lookup table. The dropdownbox is showing 384 or 385 records including 2-3 blank records right in the middle of the list. When the page is first rendered, it has scrolled the list to the first of these blank records and highlighted it. I have tried re-building the dropdownbox, it changes the number of blank records, but does not eliminate the problem. There are no blank records in the lookup table.

    Any suggestions on how to make it stop this anomalous behavior?

    #2
    Re: Dropdown List box has extra blank records not in database

    Hi

    You could try wrapping it in Ltrim() StringLength(Ltrim(a5_catch_area_dropdown)) > 0

    Have you looked at the results of this query in the query builder?

    Dropdown.png

    Michael

    Comment


      #3
      Re: Dropdown List box has extra blank records not in database

      When I run it in the query builder, it tells me I have 382 records but only shows me the first 100, which does not contain any blanks. When I run in the database's query builder, it shows me 382 records - no blanks. I will try putting in the trim statement.

      Comment


        #4
        Re: Dropdown List box has extra blank records not in database

        The Ltrim did not help. Still getting 2 blank records in the dropdownbox. Same with Rtrim.

        Comment


          #5
          Re: Dropdown List box has extra blank records not in database

          Hi

          Is there another way you can do this? A drop down of 382 is a lot of choices.

          Michael

          Comment


            #6
            Re: Dropdown List box has extra blank records not in database

            Hey Anita,

            Which SQL database?

            Any chance you could post a script and data that would create this table with data so that it could be tested?

            Comment


              #7
              Re: Dropdown List box has extra blank records not in database

              I am using SQL Server 2008. The table is coded as :
              create table TOCAS_DBA.CATCH_AREA_LOOKUP (
              CATCH_AREA_CODE varchar(4) not null,
              CATCH_AREA_NAME varchar(255) null,
              CATCH_AREA_DESC varchar(255) null,
              AREA_SORT_NUM numeric null,
              GEOG_SORT_NUM numeric null,
              FTK_AREA_CODE varchar(4) null,
              AFCRS_AREA_CODE varchar(30) null,
              REGION varchar(30) null,
              A5_CATCH_AREA_DROPDOWN varchar(255) not null,
              constraint CATCHAREALUT_PK primary key nonclustered (CATCH_AREA_CODE)
              )

              I have attached a file with the data. I am using the dropdownbox as a multi-select list. On screen it shows multiple lines with a scrollbar to let the user get to more choices. Only the A%_CATCH_AREA_DROPDOWN column is seen by the user, it then returns the list of selected catch_area_codes.
              Attached Files

              Comment


                #8
                Re: Dropdown List box has extra blank records not in database

                Anita,

                I think you're data is off a bit.

                The table create was fine, but importing txt files into Navicat is a chore... so I used Access. Pulls the txt file in easily and during the import I got errors about invalid data.

                74F Bollman Creek has double quotes in the data... maybe other stuff too. I think it's throwing stuff off. My Access table looks good until 74F then it's all messed up for about 5 rows. I removed the double quotes and imported again without error.

                I exported my Access table to SQL Server, built the dropdown, and it's perfect.

                Comment


                  #9
                  Re: Dropdown List box has extra blank records not in database

                  THANK YOU. I was not seeing the quotes when I used a query to get the data. I will hand check and repear the file I sent you and then re-import the data.

                  Comment


                    #10
                    Re: Dropdown List box has extra blank records not in database

                    That makes perfect sense, I have had this problem with a series of characters.
                    Essentially those characters "offset" the data to a new column. As the data is offset the database needs to make extra rows to handle the data. Hence more rows and blank cells.

                    I got around this by converting the CSV into an excel sheet and then excel took care of the extra characters. As you are using a text file this may not work in the same way.

                    Catch.rar

                    It seems to be OK in excel

                    Michael

                    Comment

                    Working...
                    X