Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error creating index, only on some computers
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01289203
Message ID:
01289246
Views:
11
I did clean out the temp folder and still a problem.

Have not thought of virus protection but will look into it.

I did put the following messagebox in
Select (lcRecordSource)
Afields(aFlds,lcRecordSource)
For ix = 1 To This.Parent.grd1.ColumnCount
	lcIx = '"FLD'+Alltrim(Str(ix))+'"'
	lcField = Alltrim(aFlds(ix,1))
		MESSAGEBOX('Index '+lcField)
	Index On &lcField Tag &lcIx Additive
		MESSAGEBOX('finished Index '+lcField)
Endfor
		MESSAGEBOX('Out of here')
and the errors do not happen until after the 'Out of Here' message.

This really confuses me because what is going on afterwards. Also explains why the sorting does work since the index's are created.



>Are there a lot of temp files in that folder?
>Could antivirus interfere?
>
>>I create a cursor for a grid along with indexes for each field of the cursor where code is in the click event of the grid to sort by that column.
>>
>>The following is the code
>>
>>
>>
>>lcRecordSource = this.grid.recordsource
>>this.grid.recordsource = ''
>>
>>select ;
>>...
>>from ....
>>into cursor &lcRecordSource readwrite
>>
>>
>>Select (lcRecordSource)
>>
>>Afields(aFlds,lcRecordSource)
>>
>>
>>For ix = 1 To This.Parent.grid.ColumnCount
>>	lcIx = '"FLD'+Alltrim(Str(ix))+'"'
>>	lcField = Alltrim(aFlds(ix,1))
>>	Index On &lcField Tag &lcIx Additive
>>Endfor
>>
>>this.grid.recordsource = lcRecordSource
>>
>>this.grid.refresh
>>
>>
>>
>>On some computers everthing works correctly, how ever on some I am getting the folling error;
>>
>>
>>Program Error Message Number 1718
>>Error Message: File c:\docume~~\user~~~\temp\00002x00002.tmp is readonly
>>Line Number of Error: 1718
>>
>>
>>I am at my wits end trying to figure out what is wrong. The index must be created, because by clicking on the grid headers, the columns are sorted properly etc.
>>
>>And why only on some workstations is this error occurring?
>>
>>Thanks in advance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform