Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INDEX ON Problem with SQL CURSOR
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
INDEX ON Problem with SQL CURSOR
Miscellaneous
Thread ID:
00380216
Message ID:
00380216
Views:
62
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" ) && Clean up from above SQL SELECT
Chuck Henry
Next
Reply
Map
View

Click here to load this message in the networking platform