>INDEX ON DELETED() TAG deleted >>In a number of places within the App I have code to turn a cursor created by SQL into a writeable cursor. E.g:
>SELECT myfield1,myfield2 ; > FROM mytable ; > WHERE mywherecondition ; > INTO CURSOR mycursor >USE (DBF("mycursor")) AGAIN IN 0 ALIAS mywriteablecursor >USE IN mycursor >>I've noticed that when looking at the DBF() of the cursor when the source table has an index on DELETED() it returns the DBF of the source table, but when dropping the DELETED() index and recreating the cursor the DBF() of the cursor returns the temporary cursor name as expected. The following code proves my point:
>CLOSE DATA ALL > >SET DEFAULT TO [c:\myfolder] > >CREATE DATABASE testdbc > >CREATE TABLE testdbf ( testfield C(1) ) >INDEX ON DELETED() TAG DELETED > >INSERT INTO testdbf ; > VALUES ( "1" ) > >SELECT * ; > FROM testdbf ; > INTO CURSOR testcursor > >* ----- CURSOR DBF appears to be the same as the TABLE DBF >* BAD >MESSAGEBOX("TABLE DBF is " + DBF("testdbf") ; > + CHR(13) ; > + "CURSOR DBF is " + DBF("testcursor") ; > , 64 ; > , "TABLE Indexed on DELETED().") > >USE IN testcursor > >SELECT testdbf >DELETE TAG deleted > >SELECT * ; > FROM testdbf ; > INTO CURSOR testcursor > >* ----- CURSOR DBF appears to be a temporary file name >* GOOD >MESSAGEBOX("TABLE DBF is " + DBF("testdbf") ; > + CHR(13) ; > + "CURSOR DBF is " + DBF("testcursor") ; > , 64 ; > , "TABLE not Indexed on DELETED().") >>