Thursday, March 8, 2012

Cannot Update Records that contain NULL Values!

Smile

Hi,

I am trying to use a formView with an update button to update individual records in an sql database. (when i click update it doesnt perform the update and just refreshes the page. ) One of the fields in my records is a NULL - this is also one of the fields that i need to update. When i manually go into the database and enter some data, and then go back to my form, it updates fine, but as soon as i delete the data from the field, it returns to NULL and im back to square one.

Any Ideas on how to get around this problem?

THanks

Then what's wrong? Since you delete the data from the field, it should be set to NULL. What do you expect to get after deleting the data? And what's meaing of "im back to square one"|||Fix your update statement. If you've used the wizard with "Check Original Values", then you are correct, it fails with nulls. You have to manually modify the update to handle nulls.|||

yep.. i got it now... i had to change "compare all values" to "overwrite changes". That makes sense. you cant compare null values to each other.

Thanks

No comments:

Post a Comment