>>In the Load Event of a form, I am creating a CURSOR from which to validate user input.
>>
>>In the Debugging process, I have noticed that I cannot create an index tag on the CURSOR without SET DELETED ON.
>>
>>Without SET DELETED ON, when the code gets down to the INDEX ON command, it trys to index on the E:\ADI\EBAAData\OrdrHdr file (the result is that I get an error message stating that file is read-only, which is good because altering that file's CDX would be a big no, no), even though I specifically SELECT curOrdrHdr just before the INDEX ON command.
>>
>>Would appreciate explanations / suggestions. Here's the code...
>>
>>
>>*prjChgOrder.frmNewChgSD.Load
>>
>>* To create CURSOR for Invoice number validation & to provide ShpNam data...
>>
>>SELECT ;
>> Invoice, ;
>> ShpNam ;
>> FROM E:\ADI\EBAAData\OrdrHdr ;
>> INTO CURSOR curOrdrHdr ;
>> ORDER BY Invoice
>>
>>* Furnish index to accomodate SEEK programmed into form.
>>SELECT curOrdrHdr
>>INDEX ON Invoice TAG Invoice
>>
>>USE IN SELECT( "OrdrHdr" )
>>
>
>Chuck,
>
>Add
NOFILTER clause to your select statment. That will force foxpro to create a physical cursor instead of filtered view of underlaing table.
Thanks for the info. Haven't used the
NOFILTER clause before. Will that leave a .dbf file on disk after the program is closed? One of the reasons I like to use CURSORs for temporary use is that they don't clutter up the directory with temp files left over after the program is closed; and therefore, I don't have to deal with deleting them in my cleanup code.
Chuck Henry