One clarification: If NOFILTER is used, should that be used on the first
query or the sub-query or both?

Paul 


-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard
Kaye
Sent: Monday, April 09, 2018 1:29 PM
To: profoxt...@leafe.com
Subject: RE: .tmp Is Read-Only

fyi NOFILTER==READWRITE

--

rk

-----Original Message-----
From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Frank Cazabon
Sent: Monday, April 09, 2018 1:36 PM
To: profoxt...@leafe.com
Subject: Re: .tmp Is Read-Only

Paul,

this is probably due to VFP's optimisation. Always get in the habit of using
NOFILTER as part of your SQL SELECT command.

Try it and see if it works in both scenarios for you.

Without the NOFILTER, VFP may optimise the query by just opening the cursor
again with a filter applied, this may then cause problems while indexing. My
guess is that it optimises it slightly differently in the development
environment so it works in that case, but in the runtime it handles it by
just filtering it.

Frank.

Frank Cazabon

On 09/04/2018 01:07 PM, Paul H. Tarver wrote:
> Further testing has revealed a couple of things, but I still don't 
> understand the why.
>
> The error is generating when I attempt to index the results of a query 
> made against SQL query resultant cursor. So, here's the logic: First, 
> I send a SQL Pass-through query to the server and store the large 
> number of results in TableA. Then when working on just a portion of 
> the table I issue a VFP like Select * from TableA where condition into 
> cursor TableB. Then I try to create a CDX file with three indexes for 
> TableB. In the development environment this works perfectly. However, 
> once compiled, I get the error that I noted in the previous message.
>
> Interestingly, if I change the VFP query to Select * from TableA where 
> condition into cursor TableB READWRITE, then everything works 
> perfectly in both the development and compiled versions of the program.
>
> Can anyone explain the why? I'm sure it has to do with the difference 
> between querying a cursor I made in the program versus querying a 
> cursor created from a SQL Pass-Through query. But what I can't 
> understand is that I am creating indexes on the results of the SQL 
> Pass-Through query before I ever create a sub-query of that data, so 
> it leaves me confused as to why the read-write permissions are 
> difference between the development and compiled versions of my program.
>
> Paul
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul
H.
> Tarver
> Sent: Monday, April 09, 2018 11:47 AM
> To: profoxt...@leafe.com
> Subject: .tmp Is Read-Only
>
> I think this is a two part question for VFP9:
>
>   
>
> 1)      Has anyone had any experience with getting a program error at
> runtime like this: File 
> c:\users\paul\appdata\local\temp\xxxxxxxxxxxxxxx.tmp
> is read-only? I do not get a similar error when running in development 
> mode and I have explicitly set SORTWORK, PROGWORK, EDITWORK and 
> TMPFILES in the CONFIG.FPW file.
>
> 2)      Why does VFP continue to create cursor temp files in the
> aforementioned path at all when I've manual set the path for temporary 
> files in the CONFIG.FPW file?
>
>   
>
> I'm sure it is something I'm doing wrong, so feel free to provide 
> constructive OR destructive criticism. J
>
>   
>
> Thanks!
>
>   
>
> Paul
>
>   
>
>
>
> --- StripMime Report -- processed MIME parts --- multipart/alternative
>    text/plain (text body -- kept)
>    text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/07db01d3d032$e635bce0$b2a136a0$@tpcqpc.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to