General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>Hi Naomi,
> Ok, the problem is solved! This is very strange and I think it points to a bug in VFP.
>
> I issue an update:
> UPDATE MyTable SET MyColumn = MyValue WHERE MyColumn1 = MyValue
>
> If MyColumn1 is not a primary key, then the bad behavior occurs
> BUT
> If MyColumn1 is a primary key, then the bad behavior does not occur
>
> The "Bad Behavior" is: executing the table validation rule and, upon exiting the table validation rule, committing the changes.
>
> In my code, I was able to change "MyColumn1" to a primary key and that solved the problem.
>
> I believe this is a bug. I will report this.
> Thanks very much for your help!!
>
> Best regards, Chaim
Hi Chaim,
It is expected that SQL-UPDATE command may change the current record in the target table. Especially when there is no index to optimize WHERE condition because it should scan all table.
If you think this doesn't explain the behavior you see, please provide complete repro code that shows the problem.
Thanks,
Aleksey.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only