Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Network:
Windows 2000 Server
Hi John
>>>Edward, you are right that the SQL is not locking the records. However, since the rlock() function is apparently working ok and returning .T. or .F. then I think it might be ok.
>>
>>That's exactly what I meant: it might be Ok, or it might be not. Using work area oriented UDF in Select-SQL is not reliable. I understand that it is the same work area for us (i.e. outisders), but internally VFP may create some temp. cursors switching areas and your RLOCK() may confuse it. You could do the same by plain SEEK/SCAN.
>
>Edward,
>I'm glad you keep challenging this. It makes me think more deeply about it. My thought on your comment about UDF is that the rlock() function is not a User Defined Function (UDF), it is a built in VFP function that is working directly on the table. Anyway, after trying it in a few more prgs it we have not found any problems, yet.
It doesn't matter if it's a UDF or a built-in VFP function. VFP always opens the tables again with different aliases while the query runs.
recno is a built in function. Check the effects of the following:
clear all
use sometable in a
select 0
select recno("sometable") from sometable
You'll get 1 for all rows. The truth is you cannot be 100% sure what alias sometable will be in the query.
Previous
Next
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