Hi,
Why does SET DELETED get set to OFF prior to calling OpenTables?
Here's the part of the function in cDataEnv.prg:
FUNCTION OpenTables()
************************************************************
* Method: CDataEnvironment.OpenTables() - CDATAENV.PRG
*
*) Description:
*) Uses the superclass' OpenTables() method to open
*) all of the tables in the aCursors[] array, it then
*) selects the database of the cursor specified in the
*) InitialSelectedAlias property.
LOCAL lcDeleted
lcDeleted = SET('DELETED')
SET DELETED OFF
*------------------------------------------------------
*-- Explicitly call the superclass' OpenTables method
*-- so it executes first and opens the specified tables
*------------------------------------------------------
DataEnvironment::OpenTables()
IF lcDeleted = 'ON'
SET DELETED ON
ELSE
SET DELETED OFF
ENDIF
This is causing me problem when pulling out reports, cause deleted records are being pulled out. If I comment out the SET DELETED OFF line then it all works as I expect.
Any ideas why this is here?
Thanks
Frank