We help IT Professionals succeed at work.

Field is not updatable

buckt
buckt asked
on
I have a user control with around 10 controls.  The controls are bound to a databindingcollection.  When I change the current record on the datasource I get an error message for one of my bound fields: "Field not updatable, Bound Property Name: Text, Field Name: <Somefieldname>"

the funny thing is that I can remove this control from the binding collection and everything works fine.  I have made sure that the control is enabled and not locked.  No use it just won't work.  I made sure the dataformat of the control is the same as the data type for the field it is getting its data from: Number

Any ideas?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2014

Commented:
what datatype is the bound field?
is it an autonumber field?
CERTIFIED EXPERT
Top Expert 2014

Commented:
after rereading your question, I would also suggest removing formatting of the data at the query level.  You might be changing the column to non-updatable with the formatting.

Commented:
This question may be long past answering, but could it be that the field in question is the primary key of the underlying table?  Or, is it a foreign key to another table (is it tied to another table through a relationship, in the case of an Access table).

Now, when you say "change current record" are you saying that you are navigating to a new record, or you are physically trying to update the current record.  In many cases, if you have bound controls, it might try to do an update when you navigate anyway.  My guess is that it's a key column, therefore is not an updatable column, but the binding is trying to do an update on it.

Author

Commented:
I didn't solve this problem but I worked around it.  I think I was making a mortal mistake.  My class datasources and bindincollections were declared public and served controls on 3 or 4 different usercontrol forms.  I think since the controls on the usercontrols were named the same that the bindingcollection was having a fit with that.  Too many controls bound to the same datasource.  I worked around it by loaded an individual class datasource and bindingcollection for each usercontrol.  When it becomes the active usercontrol that bindingcollection gets its controls rebound.  There is alot of overhead, but it fixed my problem.  It also helped isolate any errors.

Commented:
Ah, that might do it!  But all of that background wasn't in your original question!  In any event, you shouldn't leave this question open, post a 0 point question to the customer service section and ask them to delete qid=20218534

That will free up your points.

Author

Commented:
That's a good idea.  Thanks.
Commented:
Question has been answered by the User, I will refund the points and place in PAQ.

Regards,
ComTech
Community Support