I want update field
comment in some row of table Lines . I wrote in my program
Update Lines Set comment = commentVal Where userid = int(id)
Here userid is a field of integer type and there is index according this field
So I get an error message:
"Cannot perform this operation on field userid"
But if I run the same statement in MapBasic window of MapInfo:
Update Lines Set comment = "test" Where userid = 10002
then it works fine.
I do not understand what's wrong?
Currently I found the following way. Because a segment of Lines is selected then I can use the following code:
Select * From Selection Into CurData
Update CurData Set comment = commentVal
Commit Table Lines
Close Table CurData
But I still want to know what is wrong with my previous code.