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

List those not update null field value (it gives error)

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

    List those not update null field value (it gives error)

    Hi,
    I added 3 fields to a table (default value .null.).
    I noticed everytime I try to update one of those field.
    I get a message "data base could not find the data".
    I noticed that it is due to the null field when I change the value to anything not null then it works.
    I attached a small video illustrating this.

    http://www.screencast.com/t/QsmIEeoZ0sQ

    is this a bug? or I just need to fill some values for all fields?

    Thank you?

    #2
    Re: List those not update null field value (it gives error)

    You added 3 fields to what type of table? .null. is not standard sql syntax so what database are you using?

    Comment


      #3
      Re: List those not update null field value (it gives error)

      I mean I added 3 field numeric type. with allow .null.
      So the default value for exiting data is null

      Thanks

      Comment


        #4
        Re: List those not update null field value (it gives error)

        Not sure why you are setting .null. into a control on a UX. If you don't have anything to save... then just leave it. You don't have to explicitly set a control to a null value. And... where are you doing this. So much information missing that it's all just guesswork. You're creating a new record... in which fields are usually null by default anyway. Why would you do more work to put in an XBasic .null.?.. which probably isn't valid anyway.

        Comment


          #5
          Re: List those not update null field value (it gives error)

          Thanks a lot for your time David,
          This is what I am doing.
          I have a list of customer (static). I need to update the data on a mobile application.
          The database is MS sql .
          I have a table called "CUSTS" it contains the customer code and some other fields all filled with info.
          Then we needed to get the geolocation. I added 3 more fields "lat,long,accuracy" those field are numeric 18,10 .
          When I added those fields by default the value in ms sql is set to .null. (no coding) just in the table.
          In the detail view of my list I mapped these fields to text boxes. (in the table the existing records value is null)
          When I enter a value in any of these 3 fields (even manually) then click save and synchronize I get a message "database could not find the data you requested".
          I filled all these 3 field with 0 values for all exiting records. then now it is working..
          currently my specific scenario there is no issues anymore it is working as I want (I don't mind having a default value of zero for existing record).
          I am just wondering why if the value in the database (existing record) is null we get a messsage while saving the record.

          Thanks again for your time.

          Comment


            #6
            Re: List those not update null field value (it gives error)

            i think it is due to ms sql than alpha,
            in ms sql if define a number 18,10 then don't define default value and the allow null is not set then you will not be able to save the record.
            if you set it to allow null value then you can save empty values as far as i know.
            having set default value of 0 may solve the problem but aesthetically speaking it does not look good
            empty value for latitude longitude leaves unknown 0,0 leaves nowhere.
            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: List those not update null field value (it gives error)

              Paul, let's setup up the terminology first.

              You said you're working with a List... Customers... Static... but that's not quite right. Your List is not populated by a Static List of Values... as in List, Data Source Type, Static... is it? You're populating your List from the SQL Server table CUST. Right?

              Next, you refer to .null. Do you specifically set .null. somewhere? If so, where... and using what tool? Or... do you mean the Default Value for lat,long and accuracy are set to (NULL) in SQL Server Management Studio... or if using Navicat... NULL. Where are you getting .null. from?

              Next, you have not Data Bound your List Detail fields outside of the List Control... have you? The List Control handles all data binding automatically for it's Detail View.

              I've created a List, with Detail View, fed by a SQL Server table containing lat, long, and accuracy... with Defaults of NULL. No issues updating values.

              What build of Alpha are you working with?

              I doubt this is a SQL Server issue or an Alpha issue, but rather a List setup issue. However, if you could post your UX then we can tell for sure. A CUST table dump with a couple of records would really help. This way we can determine what's going on without a lot of guessing.

              Comment


                #8
                Re: List those not update null field value (it gives error)

                Make sure the write-conflict is turned off.

                Comment


                  #9
                  Re: List those not update null field value (it gives error)

                  Thank you for your replies and help.
                  When I check (Blank is null) in the fields property of the list. The issue disappeared.
                  2016-06-28_1822.png
                  Thank you,

                  Comment


                    #10
                    Re: List those not update null field value (it gives error)

                    I just want to point out I've experienced this same annoyance on many occasions (and get thoroughly ticked when I don't immediately check for this issue). I'm not here to lay blame as I don't know if this a MySQL issue or the way the code that syncs a list back to the server handles NULL values for numeric fields but some documentation on why it occurs and the correct way to work past it would be great. I've taken to being worried every time I add a new field to a table that has a list control with a detail view running off it (or pulling a new field into a lost query) as if I forget to do my current fix (updating the tables field to have a value in it while also updating any old NULL values which won't be overwritten by simply setting the default to 0) then my user gets that error and the tool I've built appears broken. So my real question is, what is the proper/easiest way to handle this? My current solution of updating field values has worked but at times it's tedious as I'll have to go change a bunch of queries that do manual inserts/updates using xbasic because I want to make sure all numeric fields have a value. Is unchecking "check for write conflicts" the correct thing or to mark all numeric fields as "blank equals NULL" property as true?

                    Comment


                      #11
                      Re: List those not update null field value (it gives error)

                      I don't think it is a MYSql issue. I have the same issue with MSSql. If you look at the statement that gets created with the write conflict turned on you will see that it would never work. It is looking for where null is = to null after the value has been changed. I can't remember exactly, since has been awhile but I think it doing something crazy like that and now the field is set at 0 so it will never work. I would like null to be null but because of various factors like legacy code I end up writing things like isnull(Amt1,'') = '' just to be safe.

                      I always set numeric columns to null. I have been turning the write conflict off.

                      Comment

                      Working...
                      X