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

User Registration With XBasic Callback Inserts Blank Row Every Now And Then

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

    User Registration With XBasic Callback Inserts Blank Row Every Now And Then

    On my mobile app in new user registration, I have an XBasic callback that inserts a row into MSSQL when a new user registers. Every now and then when a new user registers, a blank row is inserted then a real row is insert. By a blank row, I mean, it inserts a row without the username(email address). On the registration panel card in the username textbox, I have validation to make sure that the username is a email address. Any ideas why it inserts a row without the username(blank row) sometimes? Should I move from an XBasic callback to a stored procedure for user registration in inserting data into MSSQL?

    #2
    Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

    Alpha version / build?

    In your XBasic callback, end the function before the SQL Insert takes place and instead send back a message that you're coming from the callback.

    Now fire up your app, run your process, shut down the app, open it again, run the process, put the app into background etc, etc. In other words, test it thoroughly to see where that XBasic function is running.

    In your XBasic function... are you not testing for a valid username value? If not, you should be... since it's critical to any application. Your function shouldn't perform an insert complete without it, and your table shouldn't create a new record without it. Those are 2 items within your control which should be in place.

    Find out if the XBasic callback is happening by itself. I currently have an app in 5221 where the onDialogInitialize is being run twice upon startup. It can't be... but it is. Also, some control "click" events are being run twice. It's Alpha just being a bit of a mess, and I cannot see why any of it is happening... so I've had to code around it.

    Another catch is to make your table username not null. If an insert is attempted without a username it'll fail and you can send back a message.

    Comment


      #3
      Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

      It is version 12.4.4.5 Build 4491. With what you said about making username not null. The username in the table is already set to not null, so not sure how that insert is succeeding anyway?

      Comment


        #4
        Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

        Is the username of the record null or an empty string?

        Comment


          #5
          Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

          When I query the table I just see a blank field but it would have to be an empty string to get inserted, correct?

          Comment


            #6
            Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

            With the sql tools I use, when I open the table... (Null) shows up for a null value and nothing shows for an empty string.

            I would think username would have to be an empty string to get inserted.

            Comment


              #7
              Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

              Do you think doing a XBasic callback that would pass the username to a stored procedure would work better, or try to check in the xbasic function I have now to see if username is an empty string?

              Comment


                #8
                Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

                Post up the Xbasic Code and let us have a look.
                Alex Collier

                "The spread of computers and the Internet will put jobs in two categories. People who tell computers what to do, and people who are told by computers what to do"

                AA Builds from 5221_5152 to Pre-releases >> Deploying to IIS in AWS

                Comment


                  #9
                  Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

                  Just check your username. However, the ajax callback shouldn't even be happening if you have an empty username. Client-side validation is only good if you're in the field and get out... then it fires. If you never enter the control, it never fires... which means you always need to run the client-side validation in code before executing the callback.

                  If you allow your callback to run without first checking your username value, then that's the issue. You should still check in in the XBasic function... but... you should never allow leave the client with an empty username. Why bother going all the way to the server... with an empty username... just to check the username... and return have done nothing. Waste of a trip.

                  Comment


                    #10
                    Re: User Registration With XBasic Callback Inserts Blank Row Every Now And Then

                    I changed some sequence of the code and that could be the issue. I am checking to see if a username exists first before run other code to create a new user. I had some code that ran to insert username even if the username doesnt exist by assigning a variable to equal an empty string if the username doesnt exist. I guess it was running sometimes to insert that empty string. I will see if it cures the problem. One other issue. After the new user registers it leaves the username in that panel card, how do I clear that information out? I tried using {dialog.object}.resetForm('false'); in the client side event but that doesnt seem to clear it.

                    Comment

                    Working...
                    X