Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change a field in a SQL server database that's set to "Read Only Cell"?

I have a SQL database that has a table with a field set to "Read Only" when I look at it through Microsoft SQL Server Management Studio Express.

I need to change some data within that field manually but I can't see any properties that I can change that will let me override this.

Will I need to write a sql script on the table to do this or is there something that I am missing ?

like image 339
cyberbobcat Avatar asked May 06 '09 09:05

cyberbobcat


2 Answers

What is the datatype of the field? You may not be able to "type" into it if its of an ntext or image datatype and management studio can't handle the size of it.

In that case you might have no option but to perform an update as follows.

UPDATE TableName SET ColumnName = 'NewValue' WHERE PrimaryKeyId = PrimaryKeyValue
like image 94
Robin Day Avatar answered Sep 21 '22 20:09

Robin Day


The field is most likely "read-only" because it contains a calculated value.

If that's the case, you would have to change calculation in the table definition to change it's value.

like image 42
Tomalak Avatar answered Sep 24 '22 20:09

Tomalak