Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexing cursor on Windows XP

Status
Not open for further replies.

FoxAll

Programmer
Jun 13, 2003
49
CA
Hi,

I have code doing a cursor in my FORM LOAD:

SELECT * FROM (lcPath+"facture.dbf") ORDER BY facture_cd GROUP BY facture_cd INTO CURSOR zFacture_crm

SELECT zFacture_crm
INDEX ON auto_cd TAG auto_cd
INDEX ON client_cd TAG client_cd



When I run it on my machine, no problem at all
But when I run it on server I got this message :

PROGRAM: FORM1.LOAD
prog_2: PROCEDURE FORM1.LOAD C:\PROGRAM FILES\RDV9\SYSTÈME DE RENDEZ-VOUS\FORMS\FACTURE_CRM.SCT
line_num: 52
error_num: 1718
MESSAGE: Le fichier c:\docume~1\bureau\locals~1\temp\000026u1001l.tmp est en lecture seule.
specific: C:\DOCUME~1\BUREAU\LOCALS~1\TEMP\000026U1001L.TMP

Is this a windows security issue ??
Can you help ?

Alex
 
Yes, this is a security issue. By default VFP uses the temp directory of a user profile. The path C:\DOCUME~1\BUREAU\LOCALS~1\TEMP\ you show indicates this is still at the default. But normally users are allowed to write to their own temp directory.

You might be able to overwrite this with a config.fpw you put to the EXE (in PROGRAM FILES this step to creata a config.fpw there requires admin rights) and write a line TEMPDIR=... with ... being a path the users can write to.

Bye, Olaf.
 
In addition to what Olaf suggested (Hi, Olaf! Haven't seen you on Foxite lately!):

You may want to try

[tt]SELECT ... INTO CURSOR zFacture_crm NO FILTER READWRITE[/tt]

or even

[tt]... INTO TABLE < Assuredly Read-Write location, like USERPROFILE\My Documents >\zFacture_crm.DBF[/tt]

Just do not forget to erase this table's DBF and CDX files there upon exiting your program.

HTH.


Regards,

Ilya
 
Yes, I've been on Foxite much in 2007 until I think about 2009 and have been away from there as I joined experts-exchange. Nothing personnel, but I actually found my way of thinking or programming is more welcome in some places than in others and I also want to limit the number of forums or newsgroups to visit regularly.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top