Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Set Cast member Properties of a QuickTime
Toggle DirectToStage Property of a Flash Sprite
Echo Vibes
TCP UDP Xtra
cXtraCalendar
Scale Vertexlist
SetMouseLoc Xtra
Change Filled property of a Shape Sprite
2D Collision from Explore Science
Library dmm_xls for work with Microsoft Excel files
 

 

 

FAQ Can't change field value - Valentina

Added on 4/4/2001

 

Compatibilities:

Required Xtras:
Valentina

This item has not yet been rated

Author: Thomas (website)

I cannot change the value of my field, why?

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

Send e-mail