Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT-SQL recalls deleted records
Message
 
 
To
20/01/2011 17:45:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01496776
Message ID:
01496778
Views:
42
Ed,

Make sure to use SET DELETED ON and then deleted records will not be there.

>Deleted records are recalled when a cursor is created by SELECT-SQL query with keywords READWRITE or/and NOFILTER .
>Program below shows it. Is it correct? What could cause this?
>Thanks,
> Ed
>
>
>*!* program test_recall.prg
>*!* demonstrate recall of deleted records during SELECT-SQL cursor creation with keywords READWRITE or/and NOFILTER 
>CLOSE DATABASES 
>SET EXCLUSIVE ON
>SET SAFETY OFF 
>SELECT 0
>CREATE TABLE test_recall FREE (fid I(5) autoinc, fld2 N(6, 2))
>FOR lnRec = 1 TO 20  && Append 10 records
>   APPEND BLANK
>   REPLACE fld2 WITH 1 + 100 * RAND( )  && Insert random values
>ENDFOR
>DELETE FOR RECNO() > 10
>BROWSE TITLE "Table with deleted records. Click ESC"
>SELECT * from test_recall INTO CURSOR test 
>BROWSE TITLE "Cursor with deleted records. Click ESC"
>SELECT * from test_recall INTO CURSOR test READWRITE 
>BROWSE TITLE "Cursor created with READWRITE - deleted recalled. Click ESC"
>SELECT * from test_recall INTO CURSOR test NOFILTER 
>BROWSE TITLE "Cursor created with NOFILTER - deleted recalled . Click ESC"
>SELECT * from test_recall INTO CURSOR test READWRITE NOFILTER 
>BROWSE TITLE "Cursor created with READWRITE &  NOFILTER - deleted recalled . Click ESC"
>CLOSE DATABASES ALL 
>DELETE FILE test_recall.dbf
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform