First of all make sure you are using the correct command to fill the field - SetMedia and SetPicture for #kTypePicture and #kTypeBLOB fields and setField for the rest.
Then make sure you are trying to add a valid value to the field. Check type and range of the value you are adding compared to the type of the field. E.g. don't add a string to a #kTypeBoolean field, or a very high number to a #kTypeByte field.
Then make sure that the recordset you are changing a field in is not read-only. This is checked with the GetIsReadOnly command of the recordset.
The Kernel documentation of Valentina describes the read-only property of cursors like this:
-------
• Cursor is read only if it is designed as a result of join of several BaseObjects with at least one MANY BaseObject.
• Cursor built on single BaseObject can be modified.
• Cursor built as a result of join of only ONE BaseObject can be modified.
In other words Cursor is read only if there is an ambiguity in the execution of such operations as Add/Update/Delete.
-------
Finally if the field you are trying to change is actually a method and not a "real" field you cannot change the value, but must use the command ChangeFieldMethod to change the method (this is done for the entire table).
You can test if it is a method with this script:
fldRef = vDatabase.GetFieldRef(tboPersonRef, “FirstName”)
if vDatabase.GetFieldFlag(fldRef, 16) then put "this is a method field"
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA