Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL SELECT fails to return just Replaced data
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00802023
Message ID:
00802073
Views:
20
>Thanks: I Have simulated it consistantly - here is the code:
>
>CLOSE TABLES ALL
>SET SAFETY OFF
>CREATE TABLE MyTable (MyField C(10))
>USE
>USE MyTable
>SCATTER MEMVAR BLANK
>INSERT INTO MyTable FROM MEMVAR
>RLOCK() && Comment this line and it works properly
>REPLACE MyField WITH "TEST"
>*GO RecNo() && OR, Un-Comment this line and it also works properly
>SELECT * FROM MyTable WHERE MyField = "TEST"

1. If Rlock() make sure to issue Unlock
2. Why do you need to lock the record? For sure to one will be accessing it because you are the one who added to the table.
CLOSE TABLES ALL
SET SAFETY OFF
CREATE TABLE MyTable (MyField C(10))
USE
USE MyTable
SCATTER MEMVAR BLANK
INSERT INTO MyTable FROM MEMVAR
RLOCK()   && Comment this line and it works properly
REPLACE MyField WITH "TEST"
UNLOCK IN mytable
SELECT * FROM MyTable WHERE MyField = "TEST"
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform